Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

olle55

ds&ddutil.h and memleaks

This topic is 5761 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

It seems that dsutil.h and ddutil.h has some memleaks in them. I noticed that everytime i ran my program about 10mb of memory was usedup after i had exited, and if i restarted the program a few times the computer would hang. So i started to investigate. After i had commented out all sounds and images the program ran without any memleaks. I am using ddutil.h and dsutil.h to load images and sounds. So i tried to load a 10mb wav file in the PlaySound example that comes with the 8.1sdk. It dident generate any memleak. So i tried to use the directx appwizard to create a new directx program with dsound. If i loaded a 10mb wav file in that project it generated the same memleak. This is kinda strange i think. I haven't tested any further with ddutil.h. Anyone else noticed this and know how to fix it? This is how i delete my sounds and soundmanager:
      
#define SAFE_DELETE(p)  { if(p) { delete (p);     (p)=NULL; } }


SAFE_DELETE(g_pSound);
SAFE_DELETE(g_pSoundManager);
      
[edited by - olle55 on September 15, 2002 11:12:33 AM] [edited by - olle55 on September 15, 2002 11:13:39 AM]

Share this post


Link to post
Share on other sites
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!