Re: Callbacks
- Posted by Robert Craig <rds at ATTCANADA.NET> Sep 13, 1999
- 419 views
Greg Harris writes: > I'm working with dynamic subclassing and would like to > know if when I am done with a previously defined callback > can I use free() to clear it? Or will this do bad things.. I have > already restored the old callback using SetWindowLong. free() can only be used to free a block of memory allocated using allocate() or allocate_string(). If you try to free a callback address, it might work most of the time, but don't count on it always working. callback() returns an address that you can use to call a Euphoria routine from Windows or a C routine. callback() allocates some memory for this, but it's a small amount - about 80 bytes. Once you get a callback address for a Euphoria routine, you can use it for the rest of the program. I don't see much need for freeing this space. If you have a hundred different callback routines, you only need 8000 bytes. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com