nel-all
[Top][All Lists]
Advanced

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

Re: [Nel] Max4 plugin fixes


From: Cyril 'Hulud' Corvazier
Subject: Re: [Nel] Max4 plugin fixes
Date: Fri, 23 Aug 2002 10:50:59 +0200

Hi vincent,

> >   http://zerodeux.net/misc/nel/autoptr.patch
> >     Removed auto_ptr<> usage where it's forbidden
> >     It basically replace the auto_ptr<CArrayElement<T>> by a 
> > CArrayElement<T>*, and provides a destructor to cleanup any allocated 
> > arrays. For more info see 

Ok, this part of the 3dsmax plugins code is critical for 3 reasons:

- It has been writing a long time ago now (> 1 year).
- It works nice and we don't have time to get trouble with it.
- It is difficult to test correctly. Specialy the part that has been written to 
fix memory fragmentation prb.

So i propose to minimize the patch in this part of the code in order to compile 
with the latest STL version.
I understand that std::list< std:: auto_ptr< T > > can be a prb. I have fixed 
it using a NMISC::CSmartPtr.
It is a real smart pointer with reference counter, it works fine with STL 
containers.

The second use of auto_ptr, std::auto_ptr< std::vector< T > > should not be a 
problem because in this
case, i keep control on it. 

Idiot question : auto_ptr have been removed from STL specs, but are they still 
present in STL port package ? :-)

Cyril Corvazier.






reply via email to

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