G3DLine -initWithOrigin:Endpoint:

Brent Gulanowski <[email protected]> Mon, 21 Oct 2002 13:48:43 -0400
Newsgroups gmane.comp.gnu.3dkit.general
Message-ID <[email protected]>
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				[email protected]