Memory still allocated
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
What language and what environment?
For example with C++ are you delete(ing) all your new(s)?
For example with C++ are you delete(ing) all your new(s)?
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.
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.
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?
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.
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.
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.
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. :)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement