Wondering if someone with experience could possibly explain this a bit more. I have seen examples of...
[view release];
view = nil;
....inside the (void) dealloc.
What is the difference and is one better then the other?
What is the best way?
When doing retainCount testing I have personally seen nil drop a count from 3 to 0 for me...
After reading the Memory Management Guide I am trying to get my head around what is happening here My understanding "so far" is ...
- (EngineClass *)engine {
return [[engine retain] autorelease];
}
I am returning a pointer to an Engine object.
The retain count of the object is incremented to record we are making a new pointer to ...
I have an application that has multiple threads processing work from a todo queue. I have no influence over what gets into the queue and in what order (it is fed externally by the user). A single work item from the queue may take anywhere between a couple of seconds to several hours of runtime and should not be interrupted while processi...
I'm not sure if I wrote this code well (get clicks on touching buttons rapidly):
#import "iEngineRoomAppDelegate.h"
#import "iEngineRoomViewController.h"
#import "SoundEffect.h"
@implementation iEngineRoomAppDelegate
@synthesize window;
@synthesize viewController;
- (void)applicationDidFinishLaunching:(UIApplication *)application { ...
I'm creating an array in javascript using item id's from the database whenever a corresponding button is clicked on the page. Each array entry will store a custom object.
The id's from the database for a specific can start from any number like 80123 to 80223, for that specific page of data.
so the first entry in the array will be like ...
Hey Everyone,
Got a question. I have a subclassed UIView that is acting as my background where I am scrolling the ground. The code is working really nice and according to the Instrumentation, I am not leaking nor is my created and still living Object allocation growing.
I have discovered else where in my application that adding an an...
I have a web application that is eventually running out of memory when it runs on IIS 7 Windows Server 2008. When I attempt to run a memory profiler against the application to determine the leak, it is not reproducible on my development workstation...Windows Vista.
The GC collection cycles are not consistent between the server and the ...
I'm getting crashes from my UIDatePicker view and I think it's because I'm not retaining the pickers selected date. Can anyone tell me if this could be correct?
I have a modal view for selecting a toDate and a fromDate range. These values are passed into the modal view and grabbed out of the view when it's dismissed.
The view has one UI...
Hi,
I wanted to know whether malloc/new returns memory blocks from Cache or RAM.
Thanks in advance.
...
Hi All,
I am having a problem with what I believe is a memory leak which after some time is causing my app to slow down. I have a sectioned uitableview that has sections of 'movie directors' with rows of thier movies in their particular section. To do this I am calling a data object (and passing it the section header) to return that se...
I'm running some performance tests on some .NET code that processes lots of data. I want some tests that ensure the garbage collector isn't influencing my results. How do I temporarily pause the garbage collector?
...
I have a standalone program that I run locally, it is meant to be a server type program running 24/7. Recently I found that it has a memory leak, right now our only solution is to restart it every 4 hours. What is the best way to go about finding this memory leak? Which tool and method should we use?
...
I have a C++ class that I'm using from my Objective-C++ controller in my iPhone app. The C++ class does some calculations on some data, returns a result, and then is done -- but it leaks like crazy. I'm wondering if I can somehow make use of Memory Zones (aka malloc zones aka allocWithZone) to solve this. My idea is to allocate the ObjC+...
If I detach an NSThread will Cocoa run it in a separate memory heap or memory zone? For example, if I were to detach a thread, use malloc to create a large buffer, and then let the thread exit, would I get that memory back in some kind of automatic thread cleanup, or would it be leaked?
What about if I used a POSIX thread (pthread) inst...
I am writing a Qt application that has to handle big QImage s.
QImage uses implicit sharing, which means it reference counts an internal data pointer. Whenever the refcount is > 1 the object counts as "shared" and any even only potentially data modifying call issues a deep copy of the image data.
In short: I don't want deep copies to h...
I'm trying to locate where my memory has gone for a java process running in linux. Someone suggested I use pmap -x to see exactly what the memory is doing.
The output is really long but basically a good portion of it is a repeat of this:
00007fbf75f6a000 1016 - - - rwx-- [ anon ]
00007fbf76068000 12 ...
How would one go about keep an object in memory such that it won't be paged out by the OS in .Net?
i.e. Something similar to VirtualLock, but operating on an object, such that if compacting occurs and the object is moved it still would not be paged out, etc.. (I suppose one could pin the object's, determine what pages it belongs to, and...
I've been having this memory leak issue for days and I think I have some clues now. The memory of my java process keeps growing but yet the heap does not increase. I was told that this is possible if I create many threads, because Java threads uses memory outside of the heap.
My java process is a server type program so there are 1000-20...
I'm creating a flash game in actionscript 3 with an infinite universe. Because the universe is infinite the background is created dynamically using the following background engine:
BackgroundEngine.as
package com.tommedema.background
{
import br.com.stimuli.loading.BulkLoader;
import com.tommedema.utils.Settings;
import co...
In a navigation based app, I initialize an array in my app delegate without using self. When accessed in the RootViewController's cellForRowAtIndexPath:, all array objects are there and I can see it is an NSCFArray. Once the app loads, I click a table cell and in didSelectRowAtIndexPath:, that same array has a type of NSArray, no object...