Hello. I have a picture box on a form. The imageLocation of the picture box is set to a url like for example "http://www.google.mu/imgres?imgurl=http://1.bp.blogspot.com/-w6AJJ5Xoulg/T3AymMKbFlI/AAAAAAAAACI/EslCtw42HHg/s1600/jpeg.jpg&imgrefurl=http://zainriasat786.blogspot.com/2012/03/discuss-impact-that-file-format.html&h=480&w=640&sz=36&tbnid=fkqhzaWg8cSK4M:&tbnh=90&tbnw=120&zoom=1&usg=__54xTPooPnJOFy8xQS0TJXOtV1d8=&docid=JkpXnRk64SCIzM&hl=en&sa=X&ei=LjxoUO_uEsXRrQf28oDYBw&sqi=2&ved=0CD0Q9QEwBA&dur=24". When the form closes, we can see that memory is not released. I have added code to dispose the picture box on form closing but when I open the form again, the form crashes.
Is .Dispose() the best way to prevent memory leaks?
kirtee2209 9 Light Poster
Momerath 1,327 Nearly a Senior Poster Featured Poster
kirtee2209 9 Light Poster
nmaillet 97 Posting Whiz in Training
Momerath 1,327 Nearly a Senior Poster Featured Poster
nmaillet 97 Posting Whiz in Training
kirtee2209 9 Light Poster
nmaillet 97 Posting Whiz in Training
kirtee2209 9 Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.