473,467 Members | 1,300 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Problem with memory leaks

Hi,

Im currently working on a C# appn and facing a problem
with memory leaks.

In our application we have a tabcontrol and tabpage
named "Main" in it. This tabpage has a treeview control
and upon clicking on any node we create a new tabpage and
add it to the tabcontrol.

Currently in our testing we have used the dotnet memory
profiler to take snapshots before creation of a new tab
page and after closing it. Ideally speaking, the delta
should be zero. When we compare the two snapshots we find
the following objects still remaining in memory.

Int32, WeakReference, BindingContext.HashKey and String.
The increase is consistent.

When i checked the call stack of the above instances, they
are getting created when a tabpage is added to the
tabcontrol.
tabCtrl.TabPages.Add(new TabPage());


we couldn't make out why they are getting created and why
not getting disposed.

Request any help on this issue.

Thanks in Advance,
Gupta.
Nov 15 '05 #1
1 1348
Eventually these objects will be garbage collected. Trust the framework.
--
Eric Newton
APTItude Solutions
en*****@aptic.com.nospam

"Gupta" <an*******@discussions.microsoft.com> wrote in message
news:0b****************************@phx.gbl...
Hi,

Im currently working on a C# appn and facing a problem
with memory leaks.

In our application we have a tabcontrol and tabpage
named "Main" in it. This tabpage has a treeview control
and upon clicking on any node we create a new tabpage and
add it to the tabcontrol.

Currently in our testing we have used the dotnet memory
profiler to take snapshots before creation of a new tab
page and after closing it. Ideally speaking, the delta
should be zero. When we compare the two snapshots we find
the following objects still remaining in memory.

Int32, WeakReference, BindingContext.HashKey and String.
The increase is consistent.

When i checked the call stack of the above instances, they
are getting created when a tabpage is added to the
tabcontrol.
tabCtrl.TabPages.Add(new TabPage());


we couldn't make out why they are getting created and why
not getting disposed.

Request any help on this issue.

Thanks in Advance,
Gupta.

Nov 15 '05 #2

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

Similar topics

1
by: Spur | last post by:
Hi all, I implemented a memory allocation/deallocation class that logs all new/delete calls (overloaded) and remembers for each allocated block where it was allocated from (using a macro that...
2
by: Generic Usenet Account | last post by:
I have been using STL for a long time now, without any problems. Recently we generated a purification report on our software using Rational Purify, and we found some memory leaks. My colleague...
12
by: Andla Rand | last post by:
Hi, I almost feel like giving up on developing on dotnet. I have done several threaded programs with the goal to parse webpages and I have tried WebClient and then WinSock. Both programs has...
14
by: Cylix | last post by:
I have a array to store some student information, eg var s = new Array('2006001', 'Apple Joker', '5B'); normally, We get the data using s, s,s ... How can I define them more readable like s, s,...
2
by: =?Utf-8?B?Tm9tYW4gQWxp?= | last post by:
Hi, We are facing a strange problem in our ASP. NET website. Some times it gives the following unhandled exception. Error Message: Exception of type System.Web.HttpUnhandledException was...
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...
1
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.