Jump to content
  • Advertisement
Sign in to follow this  
BloodLust666

Memory still allocated

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

I'm getting the error that memory is still allocated but i can't seem to find it... Is there a way to use the alloc count they give me to find what memory is still allocated? Direct3D9: (INFO) :MemFini! Direct3D9: (WARN) :Memory still allocated! Alloc count = 448 Direct3D9: (WARN) :Current Process (pid) = 00000d98

Share this post


Link to post
Share on other sites
Advertisement
So does d3d provide an implementation for smart pointers?

It might be an idea to write a wrapper for these to ensure they are always released when out of scope if that is the case.

Share this post


Link to post
Share on other sites
the Release() isn't the problem, i know i'm releasing everything, it's my pointers, i have A LOT of pointers and most/almost all of them i allocate as an array (using new) but i can't find the ones that i don't "delete", but shouldn't the "alloc count" is the error thing help find that?

Share this post


Link to post
Share on other sites
Quote:
Original post by garyfletcher
So does d3d provide an implementation for smart pointers?

It might be an idea to write a wrapper for these to ensure they are always released when out of scope if that is the case.


Not exactly. It uses COM's IUnknown interface, which performs reference counting. However, if you are not dereferencing your objects, then the whole referencing counting idea is moot.

Interesting idea about wrapping up D3D interfaces. However, if you are having memory leaks then you should really be spending your time trying to figure out the source of the leaks - instead of "solving" the problem with garbage collection.

Share this post


Link to post
Share on other sites
i'm doing A

i already know it's a problem with pointers to my own classes that i made as arrays. there's prob. only one that i'm not "deleting" but i can't find it.

Share this post


Link to post
Share on other sites
Quote:
Original post by EvilKnuckles666
the Release() isn't the problem, i know i'm releasing everything, it's my pointers, i have A LOT of pointers and most/almost all of them i allocate as an array (using new) but i can't find the ones that i don't "delete", but shouldn't the "alloc count" is the error thing help find that?


I'm pretty sure when D3D warns you like this, it's because you haven't Release()'d something. It only monitors D3D resources currently in use, not stuff you just new yourself.

So yes, I'm 99% sure it *is* a Release() problem. :)

Share this post


Link to post
Share on other sites
ok, i went through and found where the problem is. it IS a pointer problem. it gives the assert error right when i try to delete one of my pointers. y does this happen?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!