ITS THE GRAPHICS :(
Okay, so the "memory leak" I thought I had was being caused by the graphics being used on buttons and backgrounds. Why is this happening?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Mar 5, 2011, 10:50 AM EST
patrickRank #4,458 · 342 reputationPosted Mar 5, 2011, 10:51 AM EST
patrickRank #4,458 · 342 reputationPosted Mar 5, 2011, 11:01 AM EST
Sam HobbsRank #107 · 20.5K reputationPosted Mar 5, 2011, 11:26 AM EST
I think that "graphics we created" does not answer the question. Were they created during execution of the program or created separately and then loaded and used by the program?
Alternatively to calling Dispose, if it is possible to create the object once and use the same object many times then that would be the most efficient. The next best solution is to do as suggested already; create an object then dispose of it later. I assume you were creating the object many times but not disposing. So one possibility is to add a dispose as suggested but another possibility is to move the location where the object creation occurs.