I am building some instrumentation in to an application that is heavily threaded. We have been running in to various memory issues. One of the features I would like to add to the instrumentation is to track how much memory has been allocated per thread.
I've done some research and I can see where this can be done in unmanaged C++ code...
I seem to have a huge memory leak in a large Java application. But the leak does not seem to be within the JVM memory itself (ie: heap, eden, survivor, code, perm_gen, etc.) since I don't run out of this type of memory (ie: it goes up during use, but it goes back down eventually when the GC runs).
My problem is that I run out of system...
My code works fine on my ipod, it's not slow and doesn't crash, but using Instruments I discovered 826 leaked blocks.
The Header file is:
#import "CountySelectionViewController.h"
#import "iProspectLiteAnnotation.h"
#import "iProspectLiteAnnotationView.h"
#import <CoreLocation/CoreLocation.h>
#import <iAd/iAd.h>
#import <sqlite3.h>
#imp...
I'm using VB.NET for a small control software which analyzes the messages of a video router. I need to hook up to the DLL (which includes the needed interface to the router) using WndProc. Everything was running smoothly in the Lab, but on site (where the router sends more messages) I get a huge memory leak (inside the unmanaged heap).
...
Instruments reports this a memory leak (98.6%, whatever that means):
[[NSNotificationCenter defaultCenter] postNotificationName:kNotificationSomeNotification object:self];
"self" is a subclass of UIImageView. Is including "self" in the notification causing a memory leak? If so, how do you resolve it?
...
I have bunch of events for alertDialog, Button, Checkboxes etc in android application
I have implemented the interfaces for event handling.
My question is how do I pass data which I want, which is coupled with main activity, to these event handling function lets onClick(View v){
}
There is method called setTag for View.What are my othe...
I've got a repeating NSTimer that I invalidate manually some time before I dealloc the object that owns the callback that is invoked by the timer. I verify that when I invalidate the timer, the callback is not being called anymore. When the object deallocs, an instant later I get an EXC_BAD_ACCESS. The crash is correlated with whether...
Is there a memory leak in the following code example as I have allocated memory on the heap for name which hasn't been freed? If I add free(person->name); before the free(person); line then I get a runtime error in VS "CRT detected that the application wrote to memory after end of heap buffer".
header.h:
#ifndef HEADER
#define HEADER
...
I recently watched one of the WWDC 2010 videos: Session 311 - Advanced Memory Analysis with Instruments. The link is here.
There is an interesting example in the video on finding Abandoned Memory. They say that it is often more important to debug than leaks but can be more difficult.
Abandoned Memory is defined as "Accessible allocate...
I've gone thru my app using build/analyze and been able to resolve all issues.
but running under leak tool it detects a leak and says it comes from tvc:viewDidLoad where tvc is a tableViewController
it further references NSArray -> sectionlist
it shows a malloc refct=1
then a retain refct=2
then a release refct=1
here is viewD...
I'm quite new to C++ but have some basic C knowledge. In my past C (university) projects, I used Valgrind to check for memleaks.
Now, with C++, is Valgrind a valid tool? Does C++ suffer the same problems concerning memleaks like C? Or are there even better tools to use in conjunction with C++?
...
in my tomcat startup, i set -xms , -xmx to 1GB. inside visualvm when i monitor memory
when i do sampling of memory, it doesnt show accurate memory usage, until, if i press 'snapshot', and then the java classes that utilizing memory showing correct patterns and instances count. why like this?
also, as i set tomcat memory to 1gb, memo...
I am tracking a very tough memory leak (or more likely abandoned memory) situation. I do the following:
1) start my application
2) get to a point where the application will show the leak
3) start instruments using the 'allocations' choice
4) attach to my process and start recording
5) take an initial heapshot
6) take an initial snapsh...
Hi all.
I have two tableview controllers showing CoreData objects. One is a detail view (with sentences) one is an overview (with stories).
Pick a Story -> See the Sentences.
It looks like I was over-releasing my managedObjectContext; I originally released it in both TableViewControllers in dealloc and got a crash every third time I we...
I made a mistake when using Leaks instrument that I thought total living objects is byte of memory, so I updated my post!
[Updated]
Hello All,
I am facing with a problem that:
My application present realtime data by using UITableView which may contains maximum 34 customized cells, so when receiving update data, I have to do reloadDat...
maybe i dont know delphi all that well, however i wish to ask you:
at this site : http://blogs.teamb.com/joannacarter/2004/06/30/690 i found an implemetation of observer pattern based on iterface.
when doing attach , there is a call to this:
procedure TSubject.Attach(Observer: IObserver);
begin
if fObservers = nil then
fObse...
I have been hunting down memory leaks for some time in my app. As of right now, as I flip back and forth between two views while watching the memory monitor instrument, the real memory fluctuates between 5 and 6 megs. This is all fine -- as far as I can tell everything is getting released properly when I pop back off a view. However, the...
In any iphone template UIViewController class you will see this:
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
}
But if I set self.myOutlet = nil in viewDidUnload, and I also have [self.myOutlet release] in the dealloc method, isn't that over-releasing self.myOutlet, s...
Hi,
i have some problems with my site. it eats ram like a monster.
javascript causes that but i don't know what to do.
i use jquery framework and jwplayer(+some listeners)
how can I detect which code causes that?
...
// ClassA.m
NSString *strA = [[NSstring alloc] initWithString:@"test string"];
ClassB *classB = [[ClassB alloc] init];
[classB setStrB:strA];
[strA release];
// classB will be released later
// ClassB.h
@property (nonatomic, retain) NSString *strB;
// ClassB.m
// custom setter
-(void) setStrB:(NSString *)newStr {
strB = newStr...