Sign in to follow this  

Memory Management characteristics - Sharpdx in Release/Debug

This topic is 487 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys,

 

I've been debugging my map editor for my game for the last few days.  As I am moving closer to using it for my project (and hopefully one day release) I am finding some interesting issues.

 

I have some inefficient code which is releasing Vertex buffers and recreating them (really dont need to do this as Im only really updating the same sized data set).  But, under high memory usage (not huge), I get out of memory when allocating vertex buffers (32 x 240Kb * 8).   quadtree implementation I am doing (and its not efficient either at the moment).  BUT, if I turn off Debug, the memory issue goes away, in fact I stress tested the inefficient function many times with no failure.  But, turn on debug again, it fails after about 20 calls.

 

I tested this a number of ways over the past day or so plus did a shakeout of all managed resources to ensure they are indeed released.

 

Now, is this something to do with c# or is it more to do with how Sharpdx handles video memory?

 

I will fix the code anyway to not be so inefficient, but just wondering about characteristics of debug and release (on x86 or x64, it doesnt matter).  Am I overlooking something?

 

Interested if anyone else has experienced the same problems.  I have also enabled object tracking and it was not showing any COM objects unreleased after each function call either.

 

Apologies if this answer ends up being a simple one.  Just wondering if Sharpdx or C# itself manages memory allocation or this is some other beast.

 

 

 

Share this post


Link to post
Share on other sites

This topic is 487 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this