Hi everyone
I use NSXMLParser for parsing an XML document. I have the following functions (among others):
- (void) parserDidStartDocument:(NSXMLParser *)parser {
// Init tempString
tempString = [NSMutableString string];
}
- (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)n...
here is code
- (void)applicationDidFinishLaunching:(UIApplication *)application {
NSBundle *bundle = [NSBundle mainBundle];
NSString *moviePath = [bundle pathForResource:@"sample_mpeg4" ofType:@"mp4"];
NSURL *movieURL = [[NSURL fileURLWithPath:moviePath] retain];
MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController al...
This Delphi code will show a memory leak for an instance of TMyImplementation:
program LeakTest;
uses
Classes;
type
MyInterface = interface
end;
TMyImplementation = class(TComponent, MyInterface)
end;
TMyContainer = class(TObject)
private
FInt: MyInterface;
public
property Impl: MyInterface read FInt write FI...
Hi,
I am suffering from an "Out of memory" exception in my Windows Service after running it for few hours under huge workload.
I used the following performance counters to detect memory leaks:
# bytes in all heap
Private bytes
Virtual bytes
The first 2 counters are going up and down regularly ... I cant see anything wrong in them.
bu...
I was recently interviewing for a C++ position, and I was asked how I guard against creating memory leaks. I know I didn't give a satisfactory answer to that question, so I'm throwing it to you guys. What are the best ways to guard against memory leaks?
Thanks!
...
Need a simple code analyzer to see if I am forgetting to free objects and classes, or to see if I am releasing them to many times.
...
In a web application running in WebLogic, we are using a (commercial) library which doesn't free the ThreadLocal variables it uses. Each time a method in the library API is used, some Kbs of information are leaked in the Thread that processes the request.
We are in the way of getting rid of the library but, in the meantime, we would lik...
I'm having some memory problems with an application, but it's a bit difficult to figure out exactly where it is. I have two sets of data:
Pageviews
The page that was requested
The time said page was requested
Memory use
The amount of memory being used
The time this memory use was recorded
I'd like to see exactly which pageviews...
#import <UIKit/UIKit.h>
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);<-----This line gets highlighted as the leak
[pool release];
return retVal;
}
It leaks right when I start the app.
...
To update the location of a GPS indicator on mapView...
[mapView removeAnnotation:myGpsAnnotation];
[myGpsAnnotation release];
myGpsAnnotation = nil;
myGpsAnnotation = [[MapLocationAnnotation alloc] initWithCoordinate:region.center annotationType:MapAnnotationTypeGps title:MAP_ANNOTATION_TYPE_GPS];
[mapView addAnnotation:myGpsAnnotation...
Hello everyone.
I have a windows multi-threded console application that appears to be leaking approximately 4kb private memory every minute or so.
In an effort to localise the leak, I have gradually suspended each thread in the application until the leak stopped, and to my surprise the culprit seems to be a thread named "Win32Thread".
...
I analyze a VB.NET project and there are some objects(child MDI form) that are disposed, but not removed by the GC.
The MemoryProfiler analysis find between others the following:
"This instance is disposed and still
indirectly rooted by an EventHandler.
This often indicates that the
EventHandler has not been properly
remov...
I would expect that after I push a view controller I then need to release my ownership of the view controller like I did below.
CustomViewController *nextViewController = [[CustomViewController alloc] initWithNibName:@"CustomView" bundle:nil];
[[self navigationController] pushViewController:nextViewController animated:YES];
[nextViewCo...
I have a simple but unanswered question.
Do I have to clean up all DisplayLists, Textures, (Geometry-)Shaders and so on by hand via the glDelete* functions, or does the GPU mem get freed automagically when my Program exits/crashes?
Note: GPU mem refers to dedicated memory on a dedicated Graphics card, not CPU memory.
...
I'm chasing a couple of potential memory leaks in a Perl code base and I'd like to know about common pitfalls with regards to memory (mis-)management in Perl.
What are common leak patterns you have observed in Perl code?
...
I'm using Visual CRT's memory leak detection routines from <crtdbg.h>; when I call _CrtDumpMemoryLeaks one allocation is reported consistently on every invocation of the program:
{133} normal block at 0x04F85628, 56 bytes long.
Data: < > B0 81 F8 04 B0 81 F8 04 B0 81 F8 04 CD CD CD CD
The address varies but {133} is a...
Can Delegates cause memory leaks?
I mean, by e.g. if a class A contains a ADelegate and the latter points to the BMethod (of B class) can this prevent the A class or B class collection by the GC?
If so, how can we "free" delegates (setting ADeletate = Nothing / null?)
How do you comment this one:
//Class A Finalize, containing ADeleg...
Hi All
Another memory question on iPhone - When running the leaks application I see a number of leaks get identified, but are caused by NSFoundation or similar, rather than my application code. Where my application name is mentioned, I have obviously resolved the leak.
I assume I can ignore these and that my app will be approved, or am...
I have the following Leak situation in a VB.NET (.NET2) application: a form - DetailTache (TaskDetails) - in my MDI application is not garbage collected is not collected ofter open/close.
I did the following profiling root:
any idea how this leak could be fixed? thanks.
EDIT:
Result search from projet of WinComboRowSelected Event....
Hey all,
I have recently been messing around with SFML, a multimedia library. I use C# so naturally I went for the .Net binding, which you can fetch from the SVN in the latest 2.0 version. After a while of messing around I noticed that my application would sometimes hang up when using the Text object, an object used to draw texture font...