TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
learner learner
NA
29
155.8k
Load 1000 images in c# without out-of-memory exception
Jan 24 2012 1:43 AM
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
Reply
Answers (
1
)
Using Classes and Objects, pretty hard stuff!
Back up mysql database using c#.