[futurebasic] Re: [FB] pass the parameters, please

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

From: Lucy24@...
Date: Wed, 6 Jan 1999 11:22:01 EST
>>If your data is located, say, in a handle-type block, then that block is
accessible (to any function) until you explicitly dispose of it.  In that
case, the block could be valid even _after_ the END FN statement.<<

Would that apply to regions? As in:

LOCAL FN makeHorridRgn&
  temprgn& = FN NEWRGN
  'bunch of toolbox cmds setting up large, complicated region
  'built in this separate FN because I use the screenht = fnlength rule of
thumb
END FN = temprgn&

LOCAL FN useHorridRgn
  temprgn& = FN makeHorridRgn&
  'now do some stuff with the region
  CALL DISPOSERGN(temprgn&)
END FN

That is, it's obviously impossible to go back into the first FN to dispose of
the region it created (because I'd actually be going into a different FN with
a fresh set of variables and its own bit of memory?), but unless the routine
is being called 60 times a second (in which case memory creep becomes visible
to the naked eye), I'm never sure the thing is really going away when I tell
it to.