I have a web application in Spring that has a functional requirement for generating a CSV/Excel spreadsheet from a result set coming from a large Oracle database. The expected rows are in the 300,000 - 1,000,000 range. Time to process is not as large of an issue as keeping the application stable -- and right now, very large result sets c...
The general rule, only objects allocated in the free store can cause memory leaks.
But objects created in the stack doesn't.
Here is my doubt,
int main()
{
myclass x;
...
throw;
...
}
If throw is not handled, it calls, terminate(), which in turn calls abort() and crashes the application. At this tim...
Hi all,
I've got a memory leak in Instruments... I've sorted some before, but this one has left me stumped! I would be very grateful if you could help... This is the method with the leak... It takes in a dictionary of data, creates a new based on it and returns it. I've commented the lines with the leaks, and the percentages it gives th...
Dear Developers,
I am getting a potential leak in these methods..can anyone please help me..Leak in method 1 is in line 5..I am referencing this method from another class as [sync loginHandler] where sync is an object of the class which has the method loginHandler..
-(void) loginHandler
{
1 SCRMsugarsoap* service = [[SCRMsugarsoap all...
I have an IntroViewController with a very large image, which increases the memory of my app by about 1.5MB. The image is set on a UIImageView within the View Controller's NIB.
Once the intro has finished, I call release on the IntroViewController, which then successfully calls dealloc on itself and calls release on the large UIImageView...
I have a button with IBAction, which shows another window:
-(IBAction)someButtonClick:(id)sender
{
anotherView = [[NSWindowController alloc] initWithWindowNibName:@"AnotherWindow"];
[anotherView showWindow:self];
}
I worry about memory management in here. I allocate an object in this IBAction and don't released it. But how ca...
Hello,
I'm working on a public release if a model using Fortran 9x and I'd like to design the code to support both static or dynamic memory management.
I've only seen one example of a code that supports something like this. It is implemented using preprocessors that look something like this:
The code would include some memory manageme...
Has anyone any guideline, book, or article for memory management in c#? I want to improve my memory management information?
...
What's the best way to avoid using GC in D? Is there a way to use classes that doesn't involve their memory being managed, or do you have to use pointers to malloc'd structs like you would in C and C++?
...
Hi everyone,
I have RootViewController and DetailsViewController in my iPhone application. I use Allocations tool to monitor my memory consumption, and I have a question.
When my app starts it takes around 4Mb memory, when I select item in RootViewController it loads UIWebView in DetailsViewController and memory rise up to 10Mb, after...
Hi,
What is causing the leaks in this code? I really cannot understand it.
On thes lines:
1: NSMutableArray * days = [[NSMutableArray alloc]init];
2: [dic setObject:days forKey:key];
3: [days addObject:value];
The whole method:
-(void) addValueToDictionary: (NSMutableDictionary *) dic withValue: (NSNumber *) value forKey: (NSString *) ...
Hey All,
I have problem with the way I treat the memory management in iphone..please please help me..I am running out of ideas..I tried to play with the below method but it started leaks when I am trying to allocate the strings for the objects (for example allocation for sid,first_name etc)..I can't figure out how to do..and this is the...
I was wondering, what (if any) is the difference between creating objects using:
NSThing *thing = [[NSThing alloc] initWithObject:object];
vs
NSThing *thing = [[NSThing thingWithObject:object] retain];
Is there a difference in how the memory management works? Also, when is it common practice to use one vs the other?
...
NSFileManager has a method to do copying.
- (BOOL)copyItemAtPath:(NSString *)srcPath toPath:(NSString *)dstPath error:(NSError **)error
If an error occurs, the third parameter (NSError **) upon return will contain an NSError object describing the problem.
Question: do I need to release it?
There are some other methods, for example t...
Hi guys, I have a ViewController and UIWebView created in Interface Builder in it. I fill webView with data like this:
NSString *urlAddress = self.artUrl;
//Create a URL object.
NSURL *url = [NSURL URLWithString:urlAddress];
//URL Requst Object
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
//Load the request in ...
Hi!
I am making a counting game for kids. At the start the child is asked find a number of items, for example: "Can you find five bikes". This is all randomly put together from seperate arrays of sounds with parts of the sentence: "Can you find" + "5" + "bikes" =three seperate mp3s. When the child starts clicking on the items, they disa...
Hi
I have this in my main.m:
printf("make autorelease pool \n");
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, @"UIApplication", @"MyAppDelegate");
[pool release];
return retVal;
And i suddenly started to get this when I run my app on the simulator:
2010-08-27 11:09:35.909 My...
Hi guys, I have a problem using UIWebViews, I've seen the same question here but there wasn't helpful answer. the question is here: http://stackoverflow.com/questions/2950907/uiwebview-memory-management . I will quote it:
I am developing an application that makes heavy use of UIWebView. This app generates dynamically lots of UIWebVie...
Hi All,
I am combating some memory issues in my app and am finally managing to get to the bottom of it. I have had an example recently where my process memory went up to 800mb when processing a task. I have managed to get this to settle at 140mb now which is perfectly acceptable. However this has made me question my understanding of the...
I decided to start using removeAllObjects so that I could re-use some of my NSMutableArrays. However, I am finding that the call to removeAllObjects causes the array to get released and so it crashes when the viewController is displayed for the second time.
I've looked on the web and it seems that some people are saying that removeAllOb...