Skip to main content
gamedev.net
🔒 Locked

COM INTERFACES

Started by of_ownage 1 reply 900+ views
Original Post
of_ownage
of_ownage
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
phresnel
phresnel
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 :/
of_ownage
of_ownage
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?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.