Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / Deleting objects memory leak.

Author
Message
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 15th Oct 2006 17:23
In my compo entry, I have small debris objects that come off explosions and such, and noticed that my game starts running really slow after a while(sub 10fps) and tracked the error down to the 'Phy Delete Rigid Body' command, it seems that it doesn't delete the collision mesh data, and piles onto the ram, however in my project it seems to run every slow, even when the objects are deleted, so it's almost asif the collision calcs are still being run despite the objects being deleted, and I would use the Sleep/Wake commands, but they are way too slow for use in realtime so I had to settle for this object, and having 100unused dynamic objects is a slowdown I don't need.

And also, will any of these bugs get fixed before the deadline? Because I'm having to use alot of doge methods to get my game to look like what I had hoped it to be, and even things like simple raycasting doesn't work, so I had to use sparkys dll, eventually there won't be much DarkPysics usage if I come across any more bugs like these.

And below is a demo showing the memory leak, if you open the task manager and watch each time the objects get reset the app`s ram usage increaces by around 6meg.




Hallowed are the ori.
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 15th Oct 2006 18:37 Edited at: 16th Oct 2006 03:04
That is interesting, its very similar to how I create my grenade objects, I wonder if I too am leaking.......



I leak also.


Must buy more ram......its the only way.
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 15th Oct 2006 23:37
I leak.

It was noticeable on my laptop, which has less RAM, more apps running, and crashes after a while.



bosskeith
18
Years of Service
User Offline
Joined: 5th Dec 2005
Location:
Posted: 16th Oct 2006 23:50
i was wondering why there was never a return of fps after deletion...memory leak is the obvious problem...hopefully an update shall have our solution.

Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 17th Oct 2006 05:49
I am doing many things similar to you Dark Coder. I have debris as well. However, I do not delete them. I simply recycle them. I cap the number of debris to 100, which looks really good. Honestly, the thought of deleting them never occurred to me, because deleting any type of resource is very inefficient.

That is only as it relates to your project. There shouldn't be a memory leak, so it's a good find.


Come see the WIP!
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 17th Oct 2006 07:55
Well my debris themselves are merely instance'd objects and I use sphere collision, and the recycling part is fast, I just didn't want 100-200 odd objects lingering around my scene, and as stated before the sleep/wake commands are useless for use in realtime, and currently I've made it so they get recycled, it's mainly an issue for my levels, as each level in my game has a few 100 objects, and if deleting them causes a memory leak then anyone playing through a few levels will end up lagging really badley.

Hallowed are the ori.

Login to post a reply

Server time is: 2024-04-25 12:51:02
Your offset time is: 2024-04-25 12:51:02