Welcome Guest, Not a member yet? Register   Sign In
Class referencing appears a memory leak
#1

[eluser]dyron[/eluser]
Hi,

now I'm develop for a while with CI. Nice Framework, but still some places for improvements.

After I work on a handball website, my system ran low and my browser crashed. Looking at the task manager shows me a storage allocation of 900MB! for firefox and 300MB! for apache. This isn't normal.

For debugging I created a helper which contains:
Code:
function debug()
{
  echo "<pre>\n";
  var_dump(func_get_args());
  echo "</pre>\n";
  die();
}

I used this for displaying $this. This was a experience.
Firebug notifies that this HTTP request causes 200MB traffic before arriving the PHP maximum_execution_time of 30 secs.
Most of the "$this" content was absolutely redundant, e.g. more than 50 CI_Config references.

Does anybody know, how I kept $this thin and clean?
I think it's a problem with
Code:
$CI =& get_instance();
in functions or
Code:
$this->CI =& get_instance();
in classes.

I use PHP 5, however I read & is deprecated. Should I use
Code:
$CI = get_instance();
instead?

My CI version is 1.5.4.

Anybody noticed such characteristics?

Regards dy


Messages In This Thread
Class referencing appears a memory leak - by El Forum - 10-31-2007, 10:53 AM
Class referencing appears a memory leak - by El Forum - 10-31-2007, 11:23 AM
Class referencing appears a memory leak - by El Forum - 10-31-2007, 11:37 AM
Class referencing appears a memory leak - by El Forum - 10-31-2007, 11:53 AM
Class referencing appears a memory leak - by El Forum - 10-31-2007, 12:15 PM
Class referencing appears a memory leak - by El Forum - 10-31-2007, 12:34 PM
Class referencing appears a memory leak - by El Forum - 11-01-2007, 01:20 AM
Class referencing appears a memory leak - by El Forum - 11-01-2007, 02:12 AM



Theme © iAndrew 2016 - Forum software by © MyBB