D3DX Memory leaks

Started by
14 comments, last by Khatharr 11 years ago

The COM stuff has reference counting but it's not automatic. You can use a custom deleter with a smart pointer to manage DX objects automatically.

Or use a smart pointer built for COM such as CComPtr.
Advertisement

I was only sugesting those macros because that's exactly what's the op doing in is code exept without macro, and would have saved him about a hundred lines of code, but i don't see him gettings downrated for no good reason. I didn't put a gun on his head and said you MUST use them, i only sugessted them to reduce is code size.

But go ahead, continue to downrate me for no reason, and for trying to help, because it was the last time i spend time here helping someone, im getting tired of those "chest beating" game for stupidity like that, and had a very bad day on top of that.

Thank you.

Hello,

I guess about 99% of the leaks are gone now. But when I turned on the DirectX debug runtime, the number of leaks did explode again. Do I have to bother with those leaks because they don't happen when I use the retail runtime?

Thanks

Jack

It's good practise that you do remove them. Retail doesn't show them because it doesn't check for them.

Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>

Do I have to bother with those leaks because they don't happen when I use the retail runtime?

They do happen when you use runtime, they just won't be shown to you. Think about like how release mode compiling won't correctly let you step through your code - just as for directx, it won't be able to detect memory leaks properly when in release mode.

The COM stuff has reference counting but it's not automatic. You can use a custom deleter with a smart pointer to manage DX objects automatically.

Or use a smart pointer built for COM such as CComPtr.

*googlygooglygoogly*

No MFC, no ATL...

_com_ptr_t

OMG, that could have been so useful when I was messing with COM.

void hurrrrrrrr() {__asm sub [ebp+4],5;}

There are ten kinds of people in this world: those who understand binary and those who don't.

This topic is closed to new replies.

Advertisement