Gerrit Voss wrote:
> Hi,
> 
> On Mon, 2007-03-12 at 09:01 -0500, Allen Bierbaum wrote:
>> Gerrit et al:
>>
>> Thank you for looking into this and tracking down some of the problems. 
>> I was a bit surprised though that you removed the changes I made to 
>> make things safer by using boost::shared_ptrs.  Was there a problem with 
>> the way I fixed it?  I spent quite a bit of time making the change and 
>> if there is a reason not to do it this way it would help me to know it 
>> so I don't spend time fixing bugs this way in the future.
> 
> Mainly I was not yet ready to revert back and forgot about sending a
> mail as I did the commits ;-(. 
> 
> One reason I changed it back was because I needed more control over the
> destruction (I needed the explicit delete) which you do not have if you
> implicitly destroy objects in a big map using boost smart pointers to
> track down some issues. 
> 
> Another your commit comment :
> 
> 'I know this is a lazy way out, but it make it easier to handle the
> complex usage patterns in the code'
> 
> If you really have a complex use pattern just lazily switching
> everything under the sun to boost shared_ptr is not a solution that buys
> you anything. From my experience you have to be very careful where you
> use shared_ptr, weak_ptr and how you create them, especially if you
> there are this pointer involved. 

I guess I haven't run into these problems.  boost shared_ptrs normally 
work much better for me then standard pointers, but maybe that is 
because of my limitations and not the code. :)

> 
> So for the testing I wanted to have a clean starting point and not
> worry about boost. 
> 
> Once I finished tracking down all the memory leaks the plan was to
> reapply the boost changes.
> 
> This way I'm sure they are not the cause of the problems. But before we
> end up arguing, this statement is made from the perspective of having
> written the code in question.

I definitely don't want to argue about it.  I just wanted to know if 
there was a reason you didn't want to use this type of thing in OpenSG. 
  It sounds like you plan to in the future and IMHO that is a good idea. 
  Our experience has been that once most code is switched over to using 
boost:;shared_ptr's (and weak_ptrs) the number of memory related bugs 
and errors decreases dramatically.  I am hopeful that it could help 
OpenSG in the same way.


> 
> It's just that the commit you saw fixed the worst memory leaks but not
> all of them. So I'm still tracking down some issues, once I have all of
> them I'm going to look back at your boost fix.

Sounds good.

-Allen


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-core

Reply via email to