Quote:
Originally Posted by grimvh2
Why? just asking :p
|
Because it is inefficient.
By adding new to a for loop you basically delete and realloc memory for every cycle.
It is just a use of CPU for something that can be avoided or something useless.
Ex:
PHP Code:
for (new i=0;i<500;i++)
{
new x;
}
Means:
PHP Code:
// 500 times alloc and reloc
for (new i=0;i<500;i++)
{
alloc memory x;
// code
delete memory x;
}
__________________