Sign in to follow this  
of_ownage

COM INTERFACES

Recommended Posts

hi, i got some problems with this crap stuff^^ i got a ID3DXFONT* created with D3DXCreateFontIndirect(); so as far as i know this increments the reference count from my Device. Now i got some memory leaks 0.62mb, and i wanted to clear them. Ok i debug, find the alloc id. then i break at that alloc ID. Its in Font->DrawText(); ok what does that mean? is the font the problem? because in my destructor i release the font and its reference count is 0!!!! so where is the memory leak? the font has a ref count 0, do i have to call release right after D3DXCreateFontIndirect()? for my Device?? i thought that this func adds a ref, and if i call Font->Release() that reference gets decremented. thank you for any help :D

Share this post


Link to post
Share on other sites
0.62MiB does not sound very measurable, you always have some fluctuations in that respect. Without knowing how you debugged your application, maybe you could check with valgrind (memcheck)?

edit: Oops, my failure. As far as I know Valgrind is GNU/Linux only. Dunno about similar and free tools for windows :/

Share this post


Link to post
Share on other sites
i debug with directx Panel and the 0.62 doesnt really matter anyway :D


i can break on allocID, that lets me break where the allocation occured that wasnt later freed. and that is in ID3DXFont->Draw, so what does that mean?^^


i really dont understand this cos if i release my font its reference count is zero so that should delete the memory.


Anyone has a idea?

Share this post


Link to post
Share on other sites

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