Archived

This topic is now archived and is closed to further replies.

Memory leak??

This topic is 5108 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

I´ve got an surface that I loads bitmaps to, to paint on e.g backbuffer.. But can I use this surface to Blt/paint to without getting memory leaks? Is it possible to get memory leaks in a DirectDraw Surface?? [edited by - cplusplus_cpp on December 15, 2003 11:51:31 AM]

Share this post


Link to post
Share on other sites
It sounds to me like you''re confusing memory leaks with overruns. A memory leak is when you allocate some memory (for your surface for example) and then don''t get rid of it when you''re finished. I.e. loads of memory is still allocated when the program exits. Or, even worse, when you keep on allocating more and more memory as the program runs and don''t ever free it up.....

What you''re describing sounds more like you are worried about writing to uninitialised areas of memory when drawing to a surface? Correct? Well, if so, you should generally be ok with a surface. But if you lock it and access the memory directly, you need to start looking at things like pitch etc. But for now, I''d say you were ok.

Hope this helps

Share this post


Link to post
Share on other sites