Do a search of the mail archive this problem with false leaks in MFC has
been discussed exhaustively with various methods shown on how to work
around the MFC bugs that produce false leaks 



Gordon

__________________________________________________________
Gordon Tomlinson

Product Manager 3D
Email  : gtomlinson @ overwatch.textron.com
__________________________________________________________
(C): (+1) 571-265-2612
(W): (+1) 703-437-7651

"Self defence is not a function of learning tricks 
but is a function of how quickly and intensely one 
can arouse one's instinct for survival" 
- Master Tambo Tetsura

 

-----Original Message-----
From: osg-users-boun...@lists.openscenegraph.org
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: Friday, January 30, 2009 11:10 AM
To: OpenSceneGraph Users
Subject: Re: [osg-users] shutting down OSG

Hi Cory,

I believe the are bugs in the memory tracking support in VS, especially
when using MFC, that produce many false positives.  You'll need to get
more info about this from VS experts though, the last time I used VS was
in the last Century!

Robert.

On Fri, Jan 30, 2009 at 3:32 PM, Cory Riddell <c...@codeware.com> wrote:
> After my (MFC) app ends, the output window in Visual Studio fills with

> a bunch of this:
>>
>> Detected memory leaks!
>> Dumping objects ->{164} normal block at 0x02A54248, 128 bytes long.
>>  Data: <                > 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00
>> {163} normal block at 0x02A541A8, 96 bytes long.
>>  Data: <  c             > F8 87 63 01 00 00 00 00 01 00 00 00 00 00
00 00
>> {161} normal block at 0x02A54068, 64 bytes long.
>>  Data: <OpenThread v1.2p> 4F 70 65 6E 54 68 72 65 61 64 20 76 31 2E 
>> 32 70
>
> I'm just getting started with OSG. I'm using it to render geometry 
> from Granite (the geometry kernel from the Pro/ENGINEER people, just 
> getting started with this too). Both libraries have their own 
> reference counted pointer types and they function a bit differently so

> I'm probably just abusing one or the other.
>
> Normally I can just pick one of the allocation numbers from the dump 
> (161, 163, and 164 above) and tell the debugger to stop there, but for

> some reason that isn't working. If I have time later today, I'm going 
> to instrument everything with BoundsChecker and run it again.
>
> Cory
>
>
> On Fri, Jan 30, 2009 at 9:08 AM, Robert Osfield 
> <robert.osfi...@gmail.com>
> wrote:
>>
>> Hi Cory,
>>
>> The OSG users ref counting, so if all external references to the 
>> scene and viewer are removed then all the associated resources should

>> be deleted automatically.  If you app keeps any references to this 
>> data then it'll stay around until these references are removed.
>>
>> If you've enabled caching in the osgDB::Registry then it can keep 
>> around a reference for loaded objects in its cache, so clearing this
>> would be required.   Also if you app loads OSG plugins as part of
>> loading your data then one could see this as items you might want to 
>> unload.
>>
>> BTW, what makes you think that things aren't being released?
>>
>> Robert.
>>
>> On Fri, Jan 30, 2009 at 2:57 PM, Cory Riddell <c...@codeware.com>
wrote:
>> > Is there a correct way to stop OSG and free all the resources that 
>> > have been acquired by without stopping the application? I thought 
>> > that when my osgViewer::Viewer instance went out of scope, 
>> > everything would be released, but that doesn't seem to be the case.
>> >
>> > cory
>> >
>> > _______________________________________________
>> > osg-users mailing list
>> > osg-users@lists.openscenegraph.org
>> >
>> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegra
>> > ph.org
>> >
>> >
>> _______________________________________________
>> osg-users mailing list
>> osg-users@lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph
>> .org
>
>
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.
> org
>
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
g
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to