Re: [osg-users] memory leak false positives on Windows

2009-02-12 Thread Matthew Fuesz
Tanguy, Robert, et al: Some good points have been raised by both sides. Singletons should be used carefully, but are still useful in certain circumstances. For the most part, it is a design decision - that is, it must be determined at the highest design level whether it makes sense to allow mul

Re: [osg-users] memory leak false positives on Windows

2009-02-12 Thread Robert Osfield
Hi Tanguy, On Thu, Feb 12, 2009 at 6:44 PM, Tanguy Fautre wrote: > What you are describing seems to me like a convenience shortcut, but not > motivated by technical limitations. > Most of the time it's neat that this happens. But again, OSG is making too > many decisions there. Too much magic i

Re: [osg-users] memory leak false positives on Windows

2009-02-12 Thread Tanguy Fautre
Behalf Of Robert Osfield Sent: Thursday 12 February 2009 16:47 To: OpenSceneGraph Users Subject: Re: [osg-users] memory leak false positives on Windows Hi Tanguy, The use of Registry Singleton is to primarily to facilate loose coupling of plugin implementations from application code. The plugins us

Re: [osg-users] memory leak false positives on Windows

2009-02-12 Thread Robert Osfield
On Thu, Feb 12, 2009 at 5:23 PM, J.P. Delport wrote: > I'm not arguing about the general evilness/goodness of singletons... I think > the concern is not just about different platforms, but about different > contexts and use cases. It seems like OSG is now being used in new contexts, > e.g. plugins

Re: [osg-users] memory leak false positives on Windows

2009-02-12 Thread J.P. Delport
boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Thursday, February 12, 2009 7:32 AM To: OpenSceneGraph Users Subject: Re: [osg-users] memory leak false positives on Windows Hi Tanguy, I'm afraid I disagree with you on your asses

Re: [osg-users] memory leak false positives on Windows

2009-02-12 Thread Robert Osfield
se of > convenience singleton, and instead provide an extra "convenience" > layer/library for applications that are happy with the default singleton > behaviour. > > > Tanguy > > > > -Original Message- > From: osg-users-boun...@lists.opensceneg

Re: [osg-users] memory leak false positives on Windows

2009-02-12 Thread Tanguy Fautre
ers-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Sukender Sent: Thursday 12 February 2009 13:35 To: gor...@gordon-tomlinson.com; OpenSceneGraph Users Subject: Re: [osg-users] memory leak false positives on Windows Hi Tanguy, Robert and Gordon, IMHO, the

Re: [osg-users] memory leak false positives on Windows

2009-02-12 Thread Sukender
___ > __ > > -Original Message- > From: osg-users-boun...@lists.openscenegraph.org > [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert > Osfield > Sent: Thursday, February 12, 2009 7:32 AM > To: OpenSceneGraph Users > Subject

Re: [osg-users] memory leak false positives on Windows

2009-02-12 Thread Gordon Tomlinson
_ __ -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert Osfield Sent: Thursday, February 12, 2009 7:32 AM To: OpenSceneGraph Users Subject: Re: [osg-users] memory leak false positives o

Re: [osg-users] memory leak false positives on Windows

2009-02-12 Thread Robert Osfield
t; > I hope I don't come as too arrogant on this. But I really think this part of > OSG doesn't do justice to the rest of the library. > > Cheers, > > Tanguy > > > -----Original Message- > From: osg-users-boun...@lists.openscenegraph.org > [mailto:osg-u

Re: [osg-users] memory leak false positives on Windows

2009-02-12 Thread Tanguy Fautre
;t do justice to the rest of the library. Cheers, Tanguy -Original Message- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay Sent: Wednesday 11 February 2009 16:21 To: OpenSceneGraph Users Subject:

Re: [osg-users] memory leak false positives on Windows

2009-02-11 Thread Cory Riddell
Jean-Claude- Thank you for reposting those links. I followed the instructions from Orhun Birsoy and can now run my app without any false memory leak reports. After all the false positives disappeared, a real memory leak (in my app) was left. Cory Jean-Claude Monnin wrote: Hi Cory,

Re: [osg-users] memory leak false positives on Windows

2009-02-11 Thread Paul Melis
Jean-Sébastien Guay wrote: Hi Cory, I don't think anybody has questioned the design of OSG. Yes, Neil has said that perhaps we should consider "restructuring" to avoid the false positives. This comes down to changing the design. I also agree with you that making code concessions to accomm

Re: [osg-users] memory leak false positives on Windows

2009-02-11 Thread Jean-Sébastien Guay
Hi Cory, I don't think anybody has questioned the design of OSG. Yes, Neil has said that perhaps we should consider "restructuring" to avoid the false positives. This comes down to changing the design. I also agree with you that making code concessions to accommodate tools is unfortunate,

Re: [osg-users] memory leak false positives on Windows

2009-02-11 Thread Tomlinson, Gordon
sage- From: osg-users-boun...@lists.openscenegraph.org [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Jean-Sébastien Guay Sent: Wednesday, February 11, 2009 10:24 AM To: OpenSceneGraph Users Subject: Re: [osg-users] memory leak false positives on Windows Hello Neil, > I note that recently the

Re: [osg-users] memory leak false positives on Windows

2009-02-11 Thread Cory Riddell
Jean-Sébastien Guay wrote: > Why would perfectly good programming practices be avoided just because > they cause false positives in one tool, on one platform? This is > pretty much the same discussion as the one concerning warnings I had > with Robert last week. > > The code should be a by-product

Re: [osg-users] memory leak false positives on Windows

2009-02-11 Thread Jean-Sébastien Guay
Hello Neil, I note that recently the OSG pages were updated to welcome over 2000 subscribers/users to the mailing list. I think that's wonderful, but I can't help thinking that as that number grows, more and more will be developers on a Micrsoft platform, and whose first attempts at using OSG

Re: [osg-users] memory leak false positives on Windows

2009-02-11 Thread Robert Osfield
Hi Neil, It's sad to see the perception of the quality of the OSG falsely brought down by these tools, it's also sad to people wasting their times chasing up false positives. The OSG's use of smart pointers and singletons is standard C++ practice, there isn't any clever hiding of resources going

Re: [osg-users] memory leak false positives on Windows

2009-02-11 Thread neil.hughes
Hi All, As a simple user of OSG in a Microsoft VS environment, I would like to say that this one issue is the most frustrating concern I have about continuing to use OSG. I recognise that for those who don't use Microsoft VS the problem doesn't occur, but, for a large proportion of OSG users, I

Re: [osg-users] memory leak false positives on Windows

2009-02-10 Thread Jean-Claude Monnin
Hi Cory, I have been able to remove the false positives from the VisualStudio leak report by doing the procedure desribed in the following post from the archive: http://lists.openscenegraph.org/htdig.cgi/osg-users-openscenegraph.org/2008-May/010839.html http://www.mail-archive.com/osg-us...@

Re: [osg-users] memory leak false positives on Windows

2009-02-10 Thread Jean-Sébastien Guay
Hi Cory, Can anybody recommend a Windows-based memory tracking tool? I have not found any tool on Windows that gave me useful results. Perhaps that was through lack of Google-skills or whatever, but I ended up changing osg::Referenced to keep track of where objects were allocated/destroyed.

Re: [osg-users] memory leak false positives on Windows

2009-02-10 Thread Cory Riddell
Can anybody recommend a Windows-based memory tracking tool? I have BoundsChecker but it thinks this is a leak:     Foo* p = new Foo;     osg::ref_ptr pFoo = p; I wrestled with Purify for a few days but even with Rational's help I could not get it to work with our application. Cory Robert Os

Re: [osg-users] memory leak false positives on Windows

2009-02-10 Thread Robert Osfield
Hi Cory, This is a bug in the memory tracking tool you have. Perhaps looking for another more robust tool would be a better use of your time. If you absolutely do want to manually force clean up then you can reset the singletons by setting them to 0. For onces that return a ref_ptr<>& you can d

[osg-users] memory leak false positives on Windows

2009-02-10 Thread Cory Riddell
I (and others) have asked about apparent memory leaks reported in Visual Studio when an OSG app exits. The leak dump looks like this: Detected memory leaks! Dumping objects -> {29751} normal block at 0x0293C970, 36 bytes long. Data: <, E > 2C 0B 45 10 00 00 00 00 01 00 00 00 0