Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
Load 1000 images in c# without out-of-memory exception
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
learner learner
12y
3.9k
1
Reply
I want to add
1000
images (each size is (40 to 100) KB) in a panel at run time in a desktop application. At first user browses all the images and load them on a panel. When it loads images one after another then memory usage shown in the task manager increases rapidly and after a certain number of images it shows the "Out of Memory Exception". Where is the fault in my code?
Before loading the 700 images task manager shows
1.05 GB
memory usage. After loading task manager shows
2.04 GB
and 2 GB RAM overflows
// code are attached
But I have seen some applications that can load huge number of images and takes memory that is negligible, for example, "Batch Image Resizer"(
http://www.jklnsoft.com/
)
Before loading the 700 images task manager shows 1.05 GB memory usage. After loading task manager shows 1.06 GB
How does the application handle memory? What mechanism do they follow?
Development environment: C#.net framework 4, windows xp, Visual Studio 2010, RAM: 2 GB
Attachment:
code.zip
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Using Classes and Objects, pretty hard stuff!
Back up mysql database using c#.