I wrote a small .NET add in to excel 2007 that read data from external c++ api and display it inside an excel.
The task manager shows that I'm having a memory leak (the memory usage is inflate linearly up to 250MB after whitch it throws an "Excel cannot complete this task with available resources error") but the problem disappears as soo...
Hi
I have the following piece of code and when I use Instruments/Object Allocations, it tells me that there is a leak there (which goes down to sqlite3MemMalloc). Is there something that I should release?
if (![managedObjectContext save:&error]) {
NSLog(@"Error while saving.");
}
The save works well and doesn't trigger an error.
...
Hi,
I'm new to C# and .NET, ,and have been reading around about it.
I need to know why and when do I need to release resources? Doesn't the garbage collector take care of everything? When do I need to implement IDisposable, and how is it different from destructor in C++?
Also, if my program is rather small i.e. a screensaver, do I nee...
In almost all of the books I read and examples I go through I see pointers initialized this way. Say that I have a class variable NSString *myString that I want to initialize. I will almost always see that done this way:
-(id)init {
if (self = [super init]) {
NSString *tempString = [[NSString alloc] init];
self.myS...
I'm trying to track down a memory leak in a COM object, and I'm not seeing anything obviously wrong. I'm probably using some of the COM wrappers incorrectly, but my standard toolkit of finding memory leaks (AQtime) isn't helping me with COM. Does anyone have any tricks/tools to track down COM memory/reference leaks?
...
I have an ItemsControl that uses a DataTemplate to display properties in my customClass that implements INotifyPropertyChanged...
Pretty straightforward...
Some items in the DataTemplate use CommandBindings (such as buttons), and a few have some code-behind (yuck).
When I empty the ItemsControl and set all instances of customClass =...
Hello,
I have been solving a lot of memory leaks but have been unsuccessful in solving this one. There are tons of NSCF memory leaks coming due to [NSCFString substringWithRange:]. I have been checking all the String allocations and have released all of them at appropriate places. The responsible library: Foundation.
Has anyone encoun...
I've been having trouble discerning which version/build of ruby to use with the most recent rails 3 beta. I was using 1.8.7 but over time the server would use too much memory and begin to slow down and eventually not work at all. Which version/build worked best for you?
...
Hey Guys,
I have .Net 3.5 SP1 with developement done in WPF.
Whenver I run my WPF application I see a process named "PresentationFontCache" appears in my Process List (on Task Manager). The process, though appears harmless, actually resides in the memory even after the WPF application is closed. What is this process actually? What doe...
Hi,
I posted this problem a few days ago but it was very muddled and my question wasnt very clear so I removed it. I've been digging around and the memory leak is still persiting. Hopefully this attempt will be clearer.
First off I've run the static analyzer and it reports no memory leaks.
I then ran Instruments and it pointed to a me...
I'm trying to think of a method demonstrating a kind of memory error using Arrays and C++, that is hard to detect. The purpose is to motivate the usage of STL vector<> in combination with iterators.
Edit: The accepted answer is the answer i used to explain the advantages / disadvantages. I also used: this
...
Hello, I am using a NSXMLParser class in my program and I assign a delegate to it.
This delegate, though, gets retained by the setDelegate: method resulting to a minor, yet annoying :-), memory leak.
I cannot release the delegate class after the setDelegate: because the program will crash.
Here is my code:
self.parserDelegate = [[Pars...
While there are already quite a few posts about leaks around UIWebView, mine is a bit more special, I believe, and thus deserves its own post here.
I see a reproducible large leak every time I load a Office document such as a Word or Excel file.
For instance, every time I display a 180KB .doc file, I get a 100KB leak. And that happens ...
I'm writing an app that has a foreground service, content provider, and a Activity front end that binds to the service and gets back a List of objects using AIDL. The service does work and updates a database.
If I leave the activity open for 4-8+ hours, and go to the "Running Services" section under settings on the phone (Nexus One) an ...
I'm creating a lot of custom controls and adding them to a FlowLayoutPanel. There is also a ContextMenuStrip created and populated at design time.
Every time a control is added to the panel it has its ContextMenuStrip property assigned to this menu, so that all controls "share" the same menu. But I noticed when the controls are removed...
have an application that processes real-time data and is supposed to beep when a certain event occurs. The triggering event can occur multiple times per second, and if the beep is already playing when another event triggers the code is just supposed to ignore it (as opposed to interrupting the current beep and starting a new one). Here...
Once again I'm hunting memory leaks and other crazy mistakes in my code. :)
I have a cache with frequently used files (images, data records etc. with a TTL of about
one week and a size limited cache (100MB)). There are sometimes more then 15000 files in a
directory. On application exit the cache writes an control file with the current...
Hi everyone,
Below is my javascript code snippet. Its not running as expected, please help me with this.
<script type="text/javascript">
function getCurrentLocation() {
console.log("inside location");
navigator.geolocation.getCurrentPosition(function(position) {
insert_coord(new google.maps.LatLng(position.coords...
I have a Tomcat Application Server that is configured to create a memory dump on OOM, and it is started with -Xmx1024M, so a Gigabyte should be available to him.
Now I found one such dump and it contains only 260MB of unretained memory. How is it possible that the dump is so much smaller than the size he should have available?
...
I have a JFrame that accepts top-level drops of files. However after a drop has occurred, references to the frame are held indefinitely inside some Swing internal classes. I believe that disposing of the frame should release all of its resources, so what am I doing wrong?
Example
import java.awt.datatransfer.DataFlavor;
import java.io...