gnu3dkit-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnu3dkit-discuss] G3DLine -initWithOrigin:Endpoint:


From: Brent Gulanowski
Subject: [Gnu3dkit-discuss] G3DLine -initWithOrigin:Endpoint:
Date: Mon, 21 Oct 2002 13:48:43 -0400

This code could possibly leak:

  vector = [[G3DVector3f alloc] initWithElements:tmp];

  line = [self initWithOrigin:s direction:vector factor:f];

  [vector release];

If an exception is raised in -initWithOrigin:direction:factor: (say, during a -copy). On OS X, the recommended solution is to autorelease the object as soon as it is instantiated. I understand that GNUstep is unable to provide autorelease pools due to an Apple patent. In which case, do you prefer to risk the leak, or to special case the code for OS X and GNUstep?

More generally, what is the preferred strategy for differentiating code for OS X and GNUstep? Do we prefer to never special case unless forced to? Are we treating GNUstep as our primary target?

--
Brent Gulanowski                                address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]