I have a custom object that I am using NSKeyedArchiver to convert to NSData so my custom object implements the NSCoding protocol. But when I run the Instruments tool, it tells me that my initWithCoder method has a number of leaked NSCFString objects inside initWithCoder.
What is the correct way to implement the NSCoding protocol?
My c...
The app I am writing is suffering quite dramatically from a memory leak. Pretty much the entire object model is staying in memory when a user closes down a loaded project. The way I know this is because closing a project in my app barely effects the memory usage in the task manager and then opening a new project almost makes it double ...
I'm trying to display dynamically changeable data manipulating with DOM elements (adding/removing them). I found out a very strange behavior of almost all browsers: after I removed a DOM element and then add a new one the browser is not freeing the memory taken by the removed DOM item. See the code below to understand what I mean. After ...
I have created WCF application which is running on Windows Service. It was installed using Windows Installer. I have followed procedure mentioned in following article for same.
http://msdn.microsoft.com/en-us/library/bb332338.aspx#msdnwcfhc_topic4
Most WCF properties are kept as default for net.tcp protocol, per call instance and so on...
Hi guys,
i have a memory leak in my app.
My app launches on a tableviewcontroller. i parse a json file to fill an array. Then this array is used to fill the tableview's cells.
I fill my array with objects (class).
I do:
[tab_Demandes removeAllObjects];
for (NSDictionary *demandeD in demandes)
{
Demande *dem =[[Demande alloc] ini...
Hello,
I am trying to use Redgate Ants memory profiler with the command line. I have seen the redgate page on the command line but did not find it very informative. Does anyone have a more detailed description on how to do this?
Thanks for any help.
...
Hi Stackoverflow,
I know this might be not correct at all, but I'm currently getting memory leaks in Instruments while using CFReadStreamRead and CFReadStreamOpen. The code looks like this:
UInt8* streambuffer = malloc(kReadStreamBufferSize);
int readBytes = CFReadStreamRead(httpReadStream,streambuffer,kReadStreamBufferSize);
...
free...
Consider this pointless program:
/* main.c */
#include <stdlib.h>
#include <unistd.h>
int main(int argc, char **argv) {
int i;
for (i = 0; i < 1024; i++) {
int pid = fork();
int status;
if (pid) {
wait(&status);
}
else {
char *ptr = (char *)malloc(1024*sizeof(char...
I'm curious what the proper way to trim a string is to ensure that no memory leak occurs. I guess this may really be a question based on exactly how free() works. I've included the code for my trim() function. See below.
int main()
{
char* testStr1 = strdup("some string");
char* testStr2 = strdup(" some string");
char* ...
Hi there,
When I analyze the following code with Instruments, it reports a leak on variable imageName:
//loadImagesFromPotatoesIndexesArray
-(void) loadImagesFromPotatoesIndexesArray{
//Load Textures from Disk
textures = [[NSMutableArray alloc] init];
//NSArray *masks = [[NSArray alloc] initWithArray:mainDelegate.masksArray...
I have a long running PHP script that has a memory leak which causes it to fail part way through. The script uses a 3rd party library and I haven't been able to find the source of the leak.
What I would like to do is create a bash script that continually runs the PHP script, processing 1000 records at a time, until the script returns a...
Hi!I am using apple standard code for scrolling+zooming+paging after 10 image scrolling and paging my console gives Memory Warning Level-1,Then Memory Warning Level-2 and then crash how can i stop crash my application?Please help me.I have taken this code from http://developer.apple.com/library/ios/#samplecode/PhotoScroller/Introduction/...
How to detect Memory leaks in Android JNI code? I am using Froyo
...
I would like to restart Windows Service after memory consumption of it reaches certain limit.
Scenario:
I have WCF Service hosted on Windows Service. WCF service keeps on increasing in memory consumption after every call without releasing significantly as seen from Task Manager. It results in OutOfMemory exception.
I would like to res...
Heres the problem. I have an app that is essentially an image gallery, it pulls images down from an xml feed, and archives them locally, then gradually loads 5 images at a time into the scroll view to be displayed.
I have had thousands of problems with using [UIImage imageNamed:...] and NSURLRequest/NSData as both cause the app to cach...
On Windows, I've long been used to the debug CRT's _CRT_LEAK_CHECK_DF functionality. When the program finishes, and once all the atexit callbacks and (in C++) global destructors have been run, it prints out a list of all the still-allocated malloc and new blocks. This is pretty crude, and the output isn't actually terribly useful, but it...
I'm using gc module to debug a leak.
It's a gui program and I've hooked this function to a button.
I've set set debug more to gc.SAVE_ALL
> gc.collect()
>
> print gc.garbage
and this is the output
[(<type '_ctypes.Array'>,), {'__module__': 'ctypes._endian', '__dict__': <attribute '__dict__' of 'c_int_Array_3' objects>, '__weakr...
Hello!
I have two singletons:
Search - performs the search functionality
Topic - presentation of topics (search results)
var Search = new function () {
this.GetTopics = function () {
var query = $("#globalSearch").val();
$.ajax({
url: 'Search/GetTopics',
dataType: 'json',
dat...
Yo
One of my WPF control is retained in memory due to one of its private member. The incriminate member is a DispatcherTimer and the retention is because of the Tick event handler. (This leak was detected with help of the tool ANTS Memory Profiler)
Obviously, I set/remove the handler on load/unload. And the control is unloaded...
voi...
Hi friends,
I am using kal calendar in my app. the things i have to show three different seprate calendar. When i run on instrument it puts lot of memory leaks on following codes. I am new to instruments and memory leaks. canbody suggest me what i have went wrong?
Regards,
sathish
CalendarDetails.h
@interface CalendarDetails : NSObje...