[futurebasic] Re: [FB] STR#

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 1999 : Group Archive : Group : All Groups

From: BMichael@...
Date: Tue, 4 May 1999 23:18:22 EDT
>My access is:  AZ$=STR#(_procedureslistSTR,PROCEDURE)
>If I key the resource as purgeable with ResEdit, the date will easily be
>garbage after using for awhile, I assume the memory manager tosses it and
>then the above will not load the information.  If the resource is coded to
>not be purgeable, then I do not have the garbage data but the program will
>crash if used for hours generally with a type -39 error.

If you're going to reuse the same strings over & over, which it appears 
you're doing, it's far better to set up a global array of strings. Load 
the resources into this array at startup, and then just use it.

In that case, purgeable is fine, and the memory will be released as 
needed. If it's non-purgeable, repeated calls will eventually fragment 
memory until you get the -39.