Page 1 of 1

Free memory of included files

Posted: Thu Sep 25, 2008 4:57 am
by anod
Hello!

I try to find answer, isit possible to exclude included before files
Below example of my code:

Code: Select all

 
<?php
echo "START: ". memory_get_usage()." bytes<br/></br>\n\n";
include_once("Class.php");
$class = new Class();
unset($class);
print_R(get_included_files());
echo "END: ". memory_get_usage()." bytes<br/></br>\n\n";
?>
 
Class.php

Code: Select all

 
<?php
class Class { 
.....
}
?>
 
Result:

Code: Select all

 
START: 809092 bytes
END: 1008532 bytes
 
The problem is that i need include couple of files and work with big arrays...
See constant increasing of memory usage...
Is there any solution?

Thank you.