Unfortunately, having two ways of dealing with the memory means more code,
and more chance of bugs ... so generally when adopting this scheme I initially
set the changeover point very small, so it's easy to exercise both schemes,
and only increase it when I'm confident both are working well.
FYI:
I've been usimg the following scheme in GDL2:
...
unsigned i;
id obj[cnt>GS_MAX_OBJECTS_FROM_STACK?0:cnt];
id *objPStart;
id *objP;
id anObject;
....
objPStart = objP = (max > GS_MAX_OBJECTS_FROM_STACK)?
GSAutoreleasedBuffer(sizeof(id)*cnt):obj; for(i=0; i < cnt; i++)
{
anObject = ...;
...
*objP++=anObject;
}
return [NSArray arrayWithObjects: objPStart count: objP - objPStart];Of course the autoreleasing should be avoided in your case so a second test would be needed to free the memory. But if anyone as any bright ideas :-)
Cheers, David
_______________________________________________ Bug-gnustep mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-gnustep
