473,386 Members | 1,764 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,386 software developers and data experts.

Memory leak when setting a label text in a timer event

VS.NET 2002, framework 1.0

I wrote a very simple program to display the RGB value and x,y mouse
position at the cursor on a 50ms timer.

I noticed a memory leak of 8K per timer event. The leak still occurs
after commenting out the code and simple having one line in the timer:

private void timerMouseColor_Tick(object sender, System.EventArgs e)
{

lblMousePos.Text = "";

}

Is there a workaround for this? After letting the program sit for a
while it naturally runs out of memory and terminates. Is this fixed
in VS.NET 2003, framework 1.1?
Nov 15 '05 #1
1 2037
I've seen my share of GC not quite working as documented, but 1.1 is a
marked improvement.

Put the 1.1 Framework on and try for yourself. It's a free download.
To run your 1.0 code on the 1.1 Framework use this in your config file:

<configuration>
<startup>
<supportedRuntime version="v1.1.4322" />
</startup>
</configuration>

HTH;
Eric Cadwell
http://www.origincontrols.com
Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: William | last post by:
I am testing a group and they seem to be havng a memory leak. Opening the page code below is eating up about 10 meg an hour. I am going threw it now to try to find out what is going on. I a bit...
3
by: anonymous | last post by:
I believe I ran into an interesting way to create memory leaks in C# 2.0 using anymous delegates. Here is a sample of the code in question. private void Handle_Event(object sender, EventArgs e)...
8
by: Beam_Us_Up_Scotty | last post by:
Hello all, I am trying to write a "simple" animation using C#, and I've tried many things but nothing seems to work for me without leaking memory. Here's a very simple piece of code that uses a...
7
by: Fernando Barsoba | last post by:
Hi, After following the advice received in this list, I have isolated the memory leak problem I am having. I am also using MEMWATCH and I think it is working properly. The program does some...
11
by: Alex | last post by:
Hello all, I have a main form(say "form1") .i want to display another form(say "form2") on occuring of an event (say a button click) and want to hide it after some time so that it will again...
4
by: Carlo | last post by:
Hi, I've a problem with a simple application and I don't know how to solve it. Create a simple vb project, create a class with some member and one event, add a timer with an interval of 10 ms....
3
by: =?ISO-8859-1?Q?=22Andr=E9s_G=2E_Aragoneses_=5B_kno | last post by:
Could you advise me if there could be any memory leak in this C# code snippet?: http://pastebin.com/m2d2ded2d As I understand, I have closed all risky objects: EventWaitHandle, and Timer. Do...
2
by: Jay | last post by:
I have a web app running on the windows CE device. In one of the asp.net pages - it has javascript code. That seems to have a memory leak. When I run the web app - in about one hour, the app hangs....
2
by: Kevin McKinley | last post by:
# I posted a few days ago about a memory leak that I think i'm having with my first Tkinter program. # I've had trouble pinpointing what is wrong so i thought i would submit the code and see if...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.