   Can't track down memory leaks
  When I quit my application the debugger reports a number of memory leaks.  If I enter the highest AllocID in the DirectX debugger panel,the Aplication breaks in a DrawPrimitive or a Present call wich is not helping at all.How can I find the source of this memory leaks?Thanks in advance.   
  Try entering the lowest one (they are sequentially numbered) because one call can trigger several leaks. Then try entering either of them as it may provide clues. Try commenting the rendering call and see if it still happens. So on with other suspicious parts. Be sure to turn on DX debug reports as well. As well as the CRT debugger which will report memory leaks too.Illco   ;  Thanks for answer. I didn't managed to solve the problem though. I've commented out the DrawPrimitive call but then the debugger breaks on Present or another DrawPrimitive call. When I tried introducing the lowest AllocID it would break at a Win32Api call ( ShowWindow ). My application  doesn't crash so I'll leave this issue aside for now.   