I know that if you do the following you most certainly have a memory leak:
id foo = [[NSObject alloc] init];
foo = nil;
But, what if you're using self.foo, a property with retain? And your code instead looks like the following:
foo = [[NSObject alloc] init];
self.foo = nil;
Is that still a memory leak since the accessor releases th...
Hi all,
I'm working on tracking down some difficult to find memory leaks in my iPhone program. I'm running a quick test on an app which leaks an NSString object with the following intentionally -incorrect- code:
-(void)applicationDidFinishLaunching:(NSNotification *)notification;
{
NSMutableString *test = [[NSMutableString alloc] i...
Hello,
I'm having a very big problem with the SerialPort class and I need some help to solve this.
We're using multiple serialports in a generic list since we need to connect to multiple devices.
This is what our basic code looks like...
List<SerialPort> ports = new List<SerialPort>();
private void button1_Click(object sender, EventA...
I am running my c++ application on an intel Xscale device. The problem is, when I run my application offtarget (Ubuntu) with Valgrind, it does not show any memory leaks.
But when I run it on the target system, it starts with 50K free memory, and reduces to 2K overnight. How to catch this kind of leakage, which is not being shown by Valg...
I have an application that allows a user to view details on a specific case w/out a postback. Each time a user requests data from the server I pull down the following markup.
<form name="frmAJAX" method="post" action="Default.aspx?id=123456" id="frmAJAX">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" />
</div>
<div>
<i...
Hello!
I have created a Ruby XMPP Framework called babylon. I have then created a few applications with it and even though they run pretty smoothly, it seems that they're eating my computer memory bit by bit.
I suspected leaks, so first, I added this at some point in my code :
puts `ps -o rss= -p #{Process.pid}`.to_i
As suspected, t...
We have a D2007 application whose memory footprint grows steadily when running on Windows Server 2008 (x64, sp1).
It behaves normally on Windows Server 2003 (x32 or x64), XP, etc... where it goes up and down as expected.
We have tried with the included Memory Manager or the latest FastMM4 4.92 with the same results.
Has anyone tried t...
I've written a fairly simply QuickLook plugin, which displays the files of a .torrent file,
The complete code is here on Github, and the main file is torrent.m
The reason I'm looking for feedback is it's acting slightly weirdly.. After building/installing the plugin (into ~/Library/QuickLook/), and running..
qlmanage -r; qlmanage -p ~...
- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:
(UIImage *)image editingInfo:(NSDictionary *)editingInfo {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
[self.pickerTrigger setImage:image];
[self.button setTitle:@" " forState:UIControlStateNormal];
[self.button setTitle:@" " forState:...
Hi developers,
I am currently working on an application which displays several UIViews in a UIScrollView. This UIScroll is inside a UIViewController.
(In a loop I am creating new UIViews with autorelease and add them to the scroll view. Could this be the problem?)
When I try to release the viewController all the subviews with their l...
What are some tips I can use to avoid memory leaks in my applications? Are there any gotchas or pitfalls that I can look out for?
...
Further to this question I've fixed a bunch of memory leaks in BEncoding.m (originally from here)
I've fixed all the obvious memory leaks, but Clang has found four "Leak of returned object" bugs, which I'm not sure how to sort:
The full messages/appropriate bits of code are:
NSMutableData *data = [[NSMutableData alloc] init];
[...
Hi
Context:
We are building a framework for rapid delivery of WPF applications. This framework uses Autofac as an IoC container and also uses regions from Prism v1. We are scheduling tasks with Parallel extensions from Microsoft.
We are facing the following problem:
When we boot the application with empty views (so just a shell with re...
I'm developing a Cocoa app, and every so often when running my app in Xcode I get the following sorts of messages in the debugging console:
<My app name>(952,0xb0103000) malloc: free_garbage: garbage ptr = 0x107b2f0, has non-zero refcount = 1
I turned on MallocStackLogging and NSZombieEnabled and did a malloc_history on a couple of...
It seems that using Critical Sections quite a bit in Vista/Windows Server 2008 leads to the OS not fully regaining the memory.
We found this problem with a Delphi application and it is clearly because of using the CS API. (see this SO question)
Has anyone else seen it with applications developed with other languages (C++, ...)?
The s...
In an Eclipse RCP application I am trying to open many editors. It is a basically a tree with lot of nodes each of which opens an editor. When I open in access of 150 to 200 editors and try to open an editor for next treenode it doesn't open. Eclipse console shows "org.eclipse.swt.SWTError: No more handles". However if I close a few of a...
Hi,
I am testing miniport driver in Window 7 OS i.e., .sys file. And I want to test memory leak for that as I will be having only .sys file so please can you tell me which is the appropriate tool for testing driver in window 7. My email id is [email protected]
...
Hello again,
I did nice winforms 2.0 application and it's working great and customers are still happy but unfortunatelly I cannot solve one issue. The problem is that after using app for a couple of hours, gdi user handles number is rising and rising and finally process cannot allocate more objects and app crashes...
I'm not doing anyt...
How can the memory leak in Eclipse RCP applications detected?
...
Hi Guys!
I'm getting this error when I run or debug my GA/AI from MyEclipse:
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
eclipse.ini looks like this:
-showsplash com.genuitec.myeclipse.product
--launcher.XXMaxPermSize 256m
-vmargs
-Xms128m
-Xmx512m
-Duser.language=en
-XX:PermSize=128M
-XX:MaxPermSize=256M...