I believe Pixmap objects are server-allocated resources, but the X client (i.e. the GNUstep application) is still expected to release the resource when it is no longer in use to prevent leaking memory on the X server. X resources should be wrapped in an Objective-C object so they can be retained/released like normal objects, and have something in their dealloc method to call XFreePixmap on the stored integer. However, there is no need to wrap them if the lifetime is well-known during design.
Cheers Chris -------- Christopher Armstrong carmstr...@fastmail.com.au On 24/12/2011, at 15:47 PM, Germán Arias wrote: > You are right this is confusing. But maybe is possible delete this code > that don't have sense. > > On 2011-12-23 03:07:24 -0600 Ivan Vučica <ivuc...@gmail.com> wrote: > >> I'm new to Xlib, but isn't Pixmap an integer? How could have one ever sent >> an >> Objective-C message to an integer? >> >> Shouldn't there be a wrapper around this integer if one wants to retain it? >> >> Why bother retaining an object which is not a part of Objective-C reference >> counting system? >> >> I'm confused. :) _______________________________________________ Gnustep-dev mailing list Gnustep-dev@gnu.org https://lists.gnu.org/mailman/listinfo/gnustep-dev