   DirectX Application (C#)
  Hiya guys,I have managed to create a DirectX app and draw images. Thank god I got that over and done with :d I have been trying to do that for ages and I have finally hit the bingo and have managed to get it all working. But now for my problem I seem to be taking all the ram up in my application after a while. I leave the application running for about 3 mins and with the animation on it takes up all the ram and then the application will crash due to lack of memory ƒ¼ Do any of you guys know what I am doing wrong is there a command to clear the ram after every frame is played in the animation? Cheers Guys,Rob 
  are you putting initialize code for polygons and bitmaps, etc, in the render function? ;  Hi,thanks for youyr reply no I have not put intialize code in the render function i thinkits to do with me chnage the sprite everytimeand not disposing of the old one. Whats the problem here? I really am stuck!!! ;  Maybe post some code? Especially concerning the loading etc of the sprite. ;  The GC should take care of any unused memory. You would see a stall if memory use becomes excessive but, not a crash. The "out of memory" points to one of two problems.1) You have used too many system resources (GDI+) without releasing the handles back to the system. Shouldn''t be the case with DirectX.2) You are holding refrences to objects you are creating in your loop. Are you using recursion to handle the loop? If so, change this to a while loop and your memory issues should go away. ;  I fixed memory problem i never dispoed of a surface. But now I have got an even BIGGER problem (the fun nver ends ) now 2.5mins in the application it will give me an errror CannotCreateDevice or somerthing stuupid. But everything works fine till 2.5mins in the app with fail! 