Setup Query for Gary: FreeResource

Benjamin Riefenstahl Benjamin.Riefenstahl@epost.de
Sat Aug 2 13:29:00 GMT 2003


Hi all,


> On Sat, 2003-08-02 at 05:16, Max Bowsher wrote:
>> According to the MS docs, FreeResource is an obsolete 16-bit
>> compatibility function. Do we really want/need to use it?

Robert Collins <rbcollins@cygwin.com> writes:
> MS recommend using DeleteIcon etc rather than it for new code - and
> yes, its nice to free resources we've used :}.

Resources can't be really freed in the Win32 subsystem.  What you get
from the resource functions is just a pointer to the memory-mapped
image of the binary.  It's the same as code.  As long as the binary
stays around so does the resource.  You can only really free
resources, if you have the resource in a DLL and you unload the DLL.


benny



More information about the Cygwin-apps mailing list