[futurebasic] Re: Clipboard/Memory??

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : December 1997 : Group Archive : Group : All Groups

From: Mike Friedman <friedo@...>
Date: Mon, 8 Dec 1997 22:13:59 -0500 (EST)
On Tue, 9 Dec 1997, Martin wrote:

> The 80 pictures I create are just a redraw of the onscreen picture
> fields I use for the game creator to click on as they layout their board
> game track onscreen, so I don't really won't to dispose of them.
> Each time I copy to the clipboard I loose a bit more memory. I suppose
> that is because I am not disposing of the Picture Handle properly.
> Why doesn't handl& = 0 dispose of that memory previously held by the
> picture created with picture on/off?

Because a handle is just a pointer to a pointer which points to the
memory, not the memory itself.  Remember, a handle is just a VARIABLE that
tells you WHERE something is in memory.  All you're doing when you say
handl& = 0 is setting that variable to zero.  The stuff in the memory
where that handle pointed is still there, and the memory you're losing is
probably due to the fact that the Mac thinks you still need that stuff,
because you haen't gone about deleting it yet.  Unfortunately, the exact
way to delete a handle escapes me - my manuals are in another state, but I
think it's a toolbox call that's something like FN DisposeHandle.  Check
your FB reference, it's in there somewhere.

> Martin
> --
> To unsubscribe, send ANY message to <futurebasic-unsubscribe@...>