On Tue, May 30, 2006 at 09:21:25AM -0700, Mike Emmel wrote: > On 5/30/06, Ville Syrjälä <[EMAIL PROTECTED]> wrote: > > On Mon, May 29, 2006 at 10:18:43PM -0700, Mike Emmel wrote: > > > On 5/29/06, Ville Syrjälä <[EMAIL PROTECTED]> wrote: > > > > On Mon, May 29, 2006 at 04:55:15PM -0700, Mike Emmel wrote: > > > > > I was looking at the implementation of this function and was surprised > > > > > to see it creates a window. Explanation ? > > > > > > > > It creates an IDirectFBWindow object but it doesn't actully create a new > > > > window (CoreWindow). > > > > > > > Yes I realized that its not clear that its created with the right > > > properties either. > > > > I don't see anything wrong with it. It first check if the core window > > exits and then constructs the object. > > > > > Why are we not saving a back pointer when we create the interface ? > > > > That's not how it's supposed to work. It is quite possible you didn't > > even create the window but someone else did. > > > > > This function is a leak waiting to happen. > > > > Why exactly? If you don't release it you leak it. That's how things work > > in DirectFB. > > > > > Create should allocate Get should return and existing interface or null. > > > > You can have multiple interfaces to the same core object. > > > > I don't disagree with a function that does this it should be called > Attach or better CreateInterface
That would mean renaming many public API methods. Not a good idea because all apps would need to follow. <snip> > > At the minimum > > Retrieve an interface to an existing window. > > Is highly misleading documentation it should say > > Create and interface to an existing window. I just looked at the docs before reading this part of your email and I had the exact same wording in mind :) I think all Get<something> methods have a similar description so they should all be changed. -- Ville Syrjälä [EMAIL PROTECTED] http://www.sci.fi/~syrjala/ _______________________________________________ directfb-dev mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev
