473,395 Members | 1,530 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

problem with System.OutOfMemoryException: Out of memory

15
Hello,
I keep getting this message thrown when using these lines of code in a loop which is repeated many times in asp.net:


pixelImage = Image.FromFile(key);
drawImage(point.X * drawWidth, point.Y * drawHeight, g, pixelImage,
drawWidth, drawHeight);
pixelImage.Dispose();
pixelImage = null;

I don't understand, why should the memory run out if each time I call the Dispose method?
Thanks,
Yuval
Sep 15 '07 #1
2 1463
klalex
1
Hi,

What kind of value of key variable? What is the size of this file?

Regards,
Alexander Kleshchevnikov.
www.klalex.com

Hello,
I keep getting this message thrown when using these lines of code in a loop which is repeated many times in asp.net:


pixelImage = Image.FromFile(key);
drawImage(point.X * drawWidth, point.Y * drawHeight, g, pixelImage,
drawWidth, drawHeight);
pixelImage.Dispose();
pixelImage = null;

I don't understand, why should the memory run out if each time I call the Dispose method?
Thanks,
Yuval
Sep 15 '07 #2
r035198x
13,262 8TB
Hello,
I keep getting this message thrown when using these lines of code in a loop which is repeated many times in asp.net:


pixelImage = Image.FromFile(key);
drawImage(point.X * drawWidth, point.Y * drawHeight, g, pixelImage,
drawWidth, drawHeight);
pixelImage.Dispose();
pixelImage = null;

I don't understand, why should the memory run out if each time I call the Dispose method?
Thanks,
Yuval
Why don't you post the whole loop so that we can see if it not infinite.
Sep 15 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Ryan Seghers | last post by:
I've got a program that has no user interface (like a service but not actually a Windows Service yet) in which I'd like to handle OutOfMemoryExceptions. I'd at least like to log the failure before...
1
by: Brandon Langley | last post by:
I have this structure that I am using in conjunction with NetLocalGroupAddMembers: public struct LOCALGROUP_MEMBERS_INFO_3 { public string lgrmi3_domainandname; } I am having failures...
1
by: Ripul Handa | last post by:
Hi We are running IIS 5.0 cluster with cisco local director. We are running a website on 2 webservers and I have been observing that from past few days we have are getting this error message of...
5
by: Versteijn | last post by:
Hello all I have a ASPX file called scaleimage.aspx that scales my images down to a given width. This page is used very much in web project I am working on. But due to the large size of the...
1
by: SMG - Idealake | last post by:
Hi all, I am getting following error on my error, what could be the reason? Exception of type System.OutOfMemoryException was thrown. Description: An unhandled exception occurred during the...
3
by: harry | last post by:
VS.NET 2002 (VB.NET) on Win XP. Is there a known bug regarding .NET reporting System.OutOfMemoryException when there is plenty of Virtual memory available? My TaskManager shows 1237M / 2181M...
1
by: Ashkan Daie | last post by:
Hi All, When trying to install a performance counter via InstallUtil I get the following exception: Creating performance counter category Enterprise Library Caching. An exception occurred...
2
by: Tomislav Fistric | last post by:
Hi all. I have very uncommon problem. I am running IIS 6.0 on 2xXEON dual core 3.06 (8 virtual CPUs) with 4 gb of Ecc ram and i get system.outofmemory exception on asp.net website. Thing is...
4
by: Daniel | last post by:
is there some per-process-limit on memory in .net processes? is there any way to increase it? i keep getting System.OutOfMemoryException when my box has 8 gigs of unused memory.
6
by: Anand Saha | last post by:
Machine: 32 bit Intel Xeon 2.93 GHz, 16 CPUs, 32 GB RAM OS: Windows Server 2003 R2 Ent Edition, SP2 Web Server: IIS 6 ASP.NET ver: 2.0 I made a simple ASP.NET application, with only this code...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.