memory

UIImage imageNamed not autoreleasing correctly

For some reason, the retain/release behavior in the following code has me completely baffled. selectedImage = [UIImage imageNamed:@"icon_72.png"]; [selectedImage release]; This should break but does not. Why? I thought imageNamed autoreleased itself which means the release here is redundant and should break when the autorelease occurs...

Does variable = null set it for garbage collection

Help me settle a dispute with a coworker: Does setting a variable or collection to null in Java aid in garbage collection and reducing memory usage? If I have a long running program and each function may be iteratively called (potentially thousands of times): Does setting all the variables in it to null before returning a value to the pa...

iphone “EXC_BAD_ACCESS” when doing sqlite3_open(":memory:", &memory_db)

Hi there! While developing for iphone i get “EXC_BAD_ACCESS” when doing sqlite3 *memory_db; if (sqlite3_open(":memory:", &memory_db) != SQLITE_OK) { sqlite3_close(memory_db); NSAssert(0, @"Failed to open in-memory database"); } also doing NSString * memory_db_filename = @":memory:"; if ...

I want to cache an entire list...but it won't fit in Memcache...

Because this list is like 2MB big...and memcache max memory is only 1MB. Is there a simple key/value alternative, just like memcache, except it can do bigger size? ...

NSMutableString leaks on append or replaceOccurrencesOfString

Hello Folks, I know similar questions have been asked time and time again but I ask that you please bear with me as I cannot seem to find an answer that helps. My application has leaks that are driving me out of my mind. Actually, they are not reported as leaks using Leaks, but my net bytes in ObjectAlloc goes up and up and up and neve...

Clear UIWebView content upon dismissal of modal view (iPhone OS 3.0)

I currently have a UIWebView that is displayed within a modal view. It is basically a detail view that provides a view of a page when the user clicks a link. When the view is dismissed and then brought up again (when the user clicks another link), the previously-loaded content is still visible and the new content loads "on top" of the ...

How to list all managed objects in heap in .Net?

Hi, is it possible to list all objects stored in heap. I would like to do something like this: IEnumerable<GCHandle> listOfObjectsInHeap = GetListOfObjectsFromHeap(); ...

Page Fault Interrupt Problems

This is a statement referring to problem caused by page fault:(from Silberschatz 7th ed P-310 last para) 'We cant simply restart instructions when instruction modifies several different location Ex:when a instruction moves 256 bytes from source to dest and either src or dest straddles on page boundary , then,after a partial move, if a ...

iPad receiving memory warning with low memory use

I have an UIWebKit with a HTML, this HTML have several images and text, but just displaying it gives me the memory warning. So I did some tests: The same HTML with different images, fullsize, and after the same images but reduced 50% from it's original size, for the 50% reduced images, I went to preview and reduced all images in 50% The...

Javascript Memory Limit

Hey Guys, I was wondering if there is a "maximum" of data a javascript application can store. I guess this is handled by the browser and that each one has it's limitation? Am I guessing right? Wrong? If there isn't a limit, will a page file be created (wouldn't be very secure I guess). ...

resizing an array with C

So I need to have an array of structs in a game I'm making - but I don't want to limit the array to a fixed size. I'm told there is a way to use realloc to make the array bigger when it needs to, but can't find any working examples of this. Could someone please show me how to do this? Thanks! ...

Another memory leak question

Hello My application keeps running for 4 to 6 hours, During this time there is no contineous increase in memory or anything similar. Then after 4 to 6 hours i start getting EOutofMemory Exceptions. Even still at that time there is only 900MB out of 3GB RAM is used as per task manager. And application itself is not using more then 200MB...

Increase performance on iphone at pdf rendering

Hi! I have a UITableView, and in every cell there's displayed a UIImage created from a pdf. But now the performance is very bad. Here's my code I use to generate the UIImage from the PDF. Creating CGPDFDocumentRef and UIImageView (in cellForRowAtIndexPath method): ... CFURLRef pdfURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(...

C instruction address

hello. Disclaimer, I not do anything in particular with regards this question, just curious. Is it possible to take address of instruction or block in C? in essence, is there jump equivalent in C? for example: void function() { int k; { // is a possible to go to this address from arbitrary point in code? int i, j; ...

How can a extend memory space at 8086 up to 1 GB ???

How can a extend memory space at 8086 up to 1 GB ??? ...

Javascript memory leak/ performance issue?

I just cannot for the life of me figure out this memory leak in Internet Explorer. insertTags simple takes string str and places each word within start and end tags for HTML (usually anchor tags). transliterate is for arabic numbers, and replaces normal numbers 0-9 with a &#..n; XML identity for their arabic counterparts. fragment = d...

Understanding CLR 2.0 Memory Model

Joe Duffy, gives 6 rules that describe the CLR 2.0+ memory model (it's actual implementation, not any ECMA standard) I'm writing down my attempt at figuring this out, mostly as a way of rubber ducking, but if I make a mistake in my logic, at least someone here will be able to catch it before it causes me grief. Rule 1: Data dependence ...

Garbage Collection in Java

On the slides I am revising from it says the following: Live objects can be identified either by maintaining a count of the number of references to each object, or by tracing chains of references from the roots. Reference counting is expensive – it needs action every time a reference changes and it doesn’t spot cyclical structur...

Memory fragmentation @ boost::asio ?

I'm pretty much stuck with a question I never got an answer for, a question which addresses an extremely important issue; memory fragmentation at boost::asio. Found nothing at the documentation nor here at SO. The async functions at boost::asio, for example async_write() & async_read_some() always allocate something. (in my case it's 1...

Get Ivar value from CGPointin Objective-C

Hi, Thanks for looking at my question. I have been trying to look around and I have been playing around with low level IVars to get information from the classes. I am having trouble trying to load the values that come from CGPoint. CGPoint point; object_getInstanceVariable(obj, [columnName UTF8String], (void **)&point); NSLog(@"%@...