OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Leaking memory on node removal


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General
View previous topic :: View next topic  
Author Message
Tini
Newbie


Joined: 07 Mar 2018
Posts: 7

PostPosted: Fri May 25, 2018 6:48 pm    Post subject:
Leaking memory on node removal
Reply with quote

Hi everyone,

I add and remove nodes (loaded from *.3ds files) without stopping OSG, but after each remove the process working set and private bytes (as reported by Process Hacker) don't drop where they were before loading the node but a few mega bytes higher, so my program keeps increasing its memory use with each node load / unload cycle.

I have verified that the root node returned from osgDB::readNodeFile() is deleted, but I'm wondering whether OSG keeps cached copies of images or vertex data in RAM or GPU, and if so, should I do anything to tell it to release them when I'm deleting a loaded node?

I add / remove the loaded node to / from its parent right before calling frame(), but I load / unload them in another thread. However I don't get crashes or any sort of errors or warnings, so I think I'm doing this right.

Thanks in advance

Cheers,
Altin
Back to top
View user's profile Send private message
Tini
Newbie


Joined: 07 Mar 2018
Posts: 7

PostPosted: Sat May 26, 2018 8:20 am    Post subject:
Reply with quote

I'm sorry for spamming with the same message, but I got server error every time I tried to post it.

My question is whether OSG for performance reasons keeps cached versions of resources that make up a scene, and if so, when I remove from the graph and later delete the root node of a scene, are these cached resources cleaned automatically, if not, is there anything I can do to signal OSG that they're not needed anymore?

Thanks.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Update node color on demand dhhabyc General 12 Sat Nov 24, 2018 3:05 pm View latest post
No new posts Detected intersector node smax23 General 0 Fri Nov 23, 2018 1:29 pm View latest post
No new posts Change color of node read from dxf file dhhabyc General 10 Sat Nov 17, 2018 12:58 pm View latest post
No new posts update node in view using cullcallback sirian_ye General 2 Wed Aug 29, 2018 11:40 pm View latest post
No new posts How to track down memory leaks? OmegaDoom General 9 Wed Jul 11, 2018 1:07 pm View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP