I wrote an automated test in order to ensure that our application does not leak (managed & unmanaged memory) now AND later as development grows up. The problem is that my test does NOT seem reliable, but I don't know whether this is inherent to .NET and leak definition or to the test.
It happens this way:
long start = PrivateBytes;
/...
I've got a fairly complex (about 20,000) line Python program which after some development has started consuming increasing amounts of memory when it runs. What are the best tools and techniques for finding out what all the memory is being used for?
Usually this comes down to either unexpectedly keeping references to objects, or extensio...
I'm writing some Windows software and when it terminates, I'm getting a lot of incorrect memory leak messages:
Detected memory leaks!
Dumping objects ->
{29745} normal block at 0x02938E38, 36 bytes long.
Data: <, E > 2C 0B 45 10 00 00 00 00 01 00 00 00 01 CD CD CD
{29732} normal block at 0x02938C08, 500 bytes long.
Data: ...
I was told I can add the -XX:+HeapDumpOnOutOfMemoryError parameter to my JVM start up options to my JBoss start up script to get a heap dump when we get an out of memory error in our application. I was wondering where this data gets dumped? Is it just to the console, or to some log file? If it's just to the console, what if I'm not lo...
Suppose my Delphi classes look like this:
interface
type
TMySubInfo = class
public
Name : string;
Date : TDateTime;
Age : Integer;
end;
TMyInfo = class
public
Name : string;
SubInfo : array of TMySubInfo;
destructor Destroy; override;
end;
implementation
de...
Does this line leak if we remove TextBox from the visual and logical tree?
To me this leaks because Mouse.MouseDown has a reference on myHandler and nothing is done to remove the handler.
<TextBox Mouse.MouseDown="myHandler" />
I'm not sure, because this code is common practice.
...
I'm looking for some random crashes in an old c++ application. Using sysinternals process explorer, I noticed the app losing handles, and extracted the exact situation, where the program is losing handles to a very short piece of code.
DWORD WINAPI MyTestThread( void* PThread)
{
_endthreadex(0);
return 0;
}
int WINAPI WinMain( HINST...
We have an application that behaves really badly in IE6, the application relies heavily on javascript and most of the activity happens in one page.
In IE6, it seems that memory keeps piling up and never gets cleared even when you navigate to a different site!
Since there's not so little code running within the browser, I'm looking for ...
Hi All
I have a customized exception class.
say class CustomExcep{};
My Application is a middleware made of C++. It is a webservice which is used for the communication between Java based web Front-end and the DCE Backend.
whenever the DCE Backend is not running or down due to some core dumps, the application throws the CustomExcep.
I...
Hi All,
We are using the CString class throughout most of our code. However sometimes we need to convert to a char *. at the moment we have been doing this using variable.GetBuffer(0) and this seems to work ( this mainly happens when passing the Csting into a function where the function requires a char *). The function accepts this and ...
- (id)copyWithZone:(NSZone *)zone {
PoolFacility *copy = [[[self class] allocWithZone:zone]init];
copy.name = [self.name copy];
copy.type = [self.type copy];
copy.phoneNumber = [self.phoneNumber copy];
//make sure I get proper copies of my dictionaries
copy.address = [self.address mutableCopy];
copy.webAddre...
My application is running on Windows Server 2000. The memory usage keeps growing (from 145m).
Is that normal? I am new to Java. The version is Tomcat5.5.
...
Okay, so I have two classes, call them A and B--in that order in the code. Class B instantiates class A as an array, and class B also has an error message char* variable, which class A must set in the event of an error. I created a third class with a pure virtual function to set the errorMessage variable in B, then made B a child of that...
Is it useful to write a standardised TDD [Test] method that would expose common memory issues ?
The set of tests could be easily, quickly applied to a method and would red-fail 'classic' .NET memory issues but would green-pass the classic solutions.
For example common memory issues could be : too much relocation by the garbage collec...
I need to make some custom objects in VBA that will need to reference each other and I have a some issues.
First - how do object constructors work in VBA? Are there constructors?
Second - are there destructors? How does VBA handle the end of the object lifecycle? If I have an object that references others (and this is their only refere...
Hi,
My .net WCF service calls a SSIS package using the Package.Execute(); method.
After I call execute, I set pkg.Dispose() and app = null;
The memory usage keeps climbing, 100mb to 150mb all the way to almost 300mb.
I am recycling the process now, but want to know the source of the problem.
Any ideas?
Update
The application that c...
A legacy c++ applications with sometimes notorious memory leak issues has to be called from a .Net server based windows application. .Net garbage collection times are not determinable and sometime the c++ object are destroyed or not destroyed "on time" producing unpredictable results and generally crashing the c# web app. What is the b...
I have a C# Windows Service running on the .NET Framework 3.5 that is exhibiting a constantly growing number of GC Handles (seen using System Monitor on Windows Server 2003).
I have ensured that all resources are disposed of correctly, and have no Finalisers in my code.
The 'Large Object Heap size', and '# Bytes in all Heaps' are compa...
Hi all,
I was curious, when one goes ahead and executes their code for leaks checking with Instruments -- is it prudent to hit all of the parts of the app manually to ensure memory leaks are occurring in that respective area? For instance, I believe I have some memory leaks in my application, deep within a UINavigationController tree. D...
Hi, i have to review a code made by some other person that has some memory leaks. Right now i'm searching the disposable objects to enclause them with the using statement and i would like to know if there is a quick way that tells you all the disposable objects declared in. I mean something like resharper or another visual studio plugin....