Replies: 2 comments 2 replies
-
That's more like a general programming question than an ATL question. First of all, I advice you handle your streams with the ATL itself doesn't keep any reference to file/stream data other than what's exposed through Let's say you scan 2000 files, each with a 600KB embedded JPEG cover, that's a potential 1.2GB footprint. If you didn't access those pictures (=if you didn't call Individually, it isn't much of a problem, but it can be an issue if you keep 1000's of That's about all I can say right now without more input from you. What caused you to ask about memory clearing in the first place? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the tips. My question might be a bit confusing at first, because I don't use ATL on a Windows Forms application. I use it on a web application (asp.net core) and my RAM is not that big! Also, because my work is based on each request, not just an always-on application, I need to make sure of memory waste and speed. So I just wanted to make sure that I close ATL myself after each request. For example, I create a lot of objects in background tasks to detect the duration of a track. In some cases, I don't really need the images. Thanks for pointing that. You can think of it like I use ATL many times a minute. But my problem was mostly with images, which I figured out. I've also tried debugging and the memory is managed correctly, and I just wanted to understand how it works so that I can close it myself at the moment I want to. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I want to know about how to delete an ATL object.
How is an object actually deleted? I don't find a direct command like
Dispose();
orClose();
.Because in most cases I get information from ATL and at that moment I want to delete the object. Anyway I dispose the stream manually but I don't know much about ATL.
Beta Was this translation helpful? Give feedback.
All reactions