Hello - In my app, I have a bunch of different image packs to download. The images are downloaded from my website one by one. The packs contain anywhere from 100-1500 images and each image is about 100KB-200KB.
When downloading the images, I have a method that selects the images to download, then I have a second method that does the act...
In my C++ project, I have a class App, and a class Window. Class App has a parameter: vector<Window*>* window;.
In App's constructor, it is able to use and push_back a Window* onto this vector fine, but in my onMessage() method, which is called by the WndProc() (I'm using winapi), it gives me an runtime error when I try to use the vecto...
Recently I am learning haXe for flash, and I have few actionscript3 experience.
HaXe is really good language.
I notice there is a delete operation in as3, Is there some like delete in HaXe? Is the "delete" about gc? Is there any tips for haXe newbie about memory management, thanks?
...
I've looked carefully at leaks and I have none (very few - all under 400 bytes). I've read a few posts about not using imageNamed calls as they cache the images. I'm not using any of those. I'm using imageWithContentsOfFile.
I AM using lots and lots of images. Mostly rendered myself using graphics contexts. I'm releasing everything and ...
My app crashes due to memory building up after every animation.
Here is my sample code:
-(IBAction) shoot: (id)delegate{
[gun setImage:[UIImage imageNamed:@"animation_machin_guns_320x480_7.png"]];
UIImage *frame1 = [UIImage imageNamed:@"animation_machin_guns_320x480_1.png"];
UIImage *frame2 = [UIImage imageNamed:@"animation_machin_guns...
Hi, am working my way through the "Beginning iPad Development" Apress book and have noticed that sometimes when the author is assigning values to a property they will use:
self.variable = value;
and other times, they will use:
variable = [value retain];
In both cases variable is a property defined as:
@property (nonatomic, retain)...
I made a tab bar application that has only one xib file. If you have have made tab bar applications before then you probably know what I did so I don't really have to explain it. I deleted the two xib files and used MainWindow.xib. I just added views to each tab bar button and assigned view controllers to each of them.
So now I have a t...
I use following code for parsing:
//init parser with readStr
NSData* xmlData = [stringToParse dataUsingEncoding:NSUTF8StringEncoding allowLossyConversion:YES];
NSXMLParser* xmlParser = [[NSXMLParser alloc] initWithData:xmlData];
//parse with events
[xmlParser setDelegate:self];
[xmlParser parse];//<<<< BAD ACC...
Using the PhotoScroller example from Apple, to reuse the memory allocated for views, I cannot get the memory released once the retain count hits 0. Here my code for a better understanding:
This piece is an extract from PhotoScroller
PhotoViewController.m
- (void)configurePage:(ImageScrollView *)page forIndex:(NSUInteger)index
{
...
I am fairly comfortable coding in languages like Java and C#, but I need to use C for a project (because of low level OS API calls) and I am having some difficulty dealing with pointers and memory management (as seen here)
Right now I am basically typing up code and feeding it to the compiler to see if it works. That just doesn't feel ...
hi
i want to get 6 Mb (Html file size)Data from web service.Its run fine on Simulator but when i run that application on ipad its give me an error Received memory warning. Level=2.
...
char* temp;
temp = (char*) malloc (strlen(window->entry.value)+1);
//strncpy( temp, window->entry.value, sizeof(temp) ); DOESN"T WORK
memcpy (temp, window->entry.value, strlen(window->entry.value) + 1); //WORKS
(where window->entry.value is a string.)
Thanks.
...
What is the default value for XX:MaxDirectMemorySize for SUN JVM 1.6?
...
Is there any way to easily limit a C/C++ application to a specified amount of memory (30 mb or so)? Eg: if my application tries to complete load a 50mb file into memory it will die/print a message and quit/etc.
Admittedly I can just constantly check the memory usage for the application, but it would be a bit easier if it would just die...
I have an object say.
ClassA *obj1 = new ClassA;
ClassA *ptr1 = obj1;
ClassA *ptr2 = obj1;
When I do delete ptr1;, will it affect ptr2? If so what can be the correct solution for this?
...
Hi all,
I'm getting a memory warning: "Incorrect decrement of the reference count of an object that is not owned at this point by the caller" for challengeCell at the marked line.
myIdentifier = @"ChallengTblVwCell";
ChallengeTableViewCell *challengeCell = (ChallengeTableViewCell *)[tableView dequeueReusableCellWithIdentifier:myIde...
I have got a linux machine whose memory snapshot when I do /proc/meminfo is :
MemTotal: 16413388 kB
**MemFree: 48296 kB**
Buffers: 193600 kB
Cached: 1986448 kB
SwapCached: 874512 kB
Active: 15034264 kB
Inactive: 713672 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 16413388...
I'm writing a program (a theorem prover as it happens) whose memory requirement is "as much as possible, please"; that is, it can always do better by using more memory, for practical purposes without upper bound, so what it actually needs to do is use just as much memory as is available, no more and no less. I can figure out how to prior...
hello,
imagine i have a main view, in which i have a call to the "AddSubview" method, like this :
[mainView addsubview:secondView];
...in this second view, i have a searchBar, with the appropriate code to show a UIkeyboard, type some text, use this one in the app, and finally dismiss the UIkeyboard.
Ok.
When this part of the program ...
When writing in C, how can I tell how much stack space is available in memory when I launch a program? How about heap space?
How can I tell how much memory is being used during the execution of my program?
...