Skip to content

Commit

Permalink
Internal resources should be taken care of during RSHUTDOWN
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Jul 22, 2013
1 parent b6885e4 commit b646a02
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions ext/phalcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,17 +682,10 @@ static PHP_MINIT_FUNCTION(phalcon){

static PHP_MSHUTDOWN_FUNCTION(phalcon){

if (PHALCON_GLOBAL(active_memory) != NULL) {
phalcon_clean_shutdown_stack(TSRMLS_C);
}

if (PHALCON_GLOBAL(function_cache) != NULL) {
zend_hash_destroy(PHALCON_GLOBAL(function_cache));
FREE_HASHTABLE(PHALCON_GLOBAL(function_cache));
PHALCON_GLOBAL(function_cache) = NULL;
}

phalcon_orm_destroy_cache(TSRMLS_C);
assert(PHALCON_GLOBAL(start_memory) == NULL);
assert(PHALCON_GLOBAL(function_cache) == NULL);
assert(PHALCON_GLOBAL(orm).parser_cache == NULL);
assert(PHALCON_GLOBAL(orm).ast_cache == NULL);

return SUCCESS;
}
Expand Down Expand Up @@ -725,7 +718,7 @@ static PHP_MINFO_FUNCTION(phalcon)
{
php_info_print_table_start();
php_info_print_table_row(2, "Phalcon Framework", "enabled");
php_info_print_table_row(2, "Phalcon Vesion", PHP_PHALCON_VERSION);
php_info_print_table_row(2, "Phalcon Version", PHP_PHALCON_VERSION);
php_info_print_table_end();
}

Expand Down

0 comments on commit b646a02

Please sign in to comment.