Jump to content
  • Advertisement
Sign in to follow this  
of_ownage

COM INTERFACES

This topic is 3456 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, 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!