memory-management
C Language: Why does malloc() return a pointer, and not the value?
From my understanding of C it seems that you are supposed to use malloc(size) whenever you are trying to initialize, for instance, an array whose size you do not know of until runtime.[详细]
2023-04-12 16:47 分类:问答details of MESI protocol for multicore processors
The details 开发者_开发技巧of the MESI protocol for multicore processors would be really important for me, but I can\'t find them anywhere. Even http://www.intel.com/content/dam/doc/manual/64-ia-32-ar[详细]
2023-04-12 15:17 分类:问答Synthesised properties for primitive data types using ARC -- weak or assign?
I was wondering what is the correct way to write synthesised properties for primitive data types (like bool) when ARC is enabled.[详细]
2023-04-12 15:15 分类:问答Idiomatic short lifespan local objects akin to RAII
I came across this fragment of Objective-C: NSNumber *theBalance = [[[NSNumberFormatter alloc] init] numberFromString: [textField text]];[详细]
2023-04-12 14:21 分类:问答passing arrays to functions in c++
I want to pass an array to a certain function in c++. I wrote the following 开发者_运维技巧code:[详细]
2023-04-12 11:08 分类:问答exc_bad_access crash in QT app
I\'m writing a QT app and I\'m very rusty with C++, so I\'m guessing that\'s the problem. I\'ve got a crash with an exc_bad_access signal on my Mac, whic开发者_StackOverflow社区h means I\'m doing some[详细]
2023-04-12 11:01 分类:问答xcode: How to connect intruments Leaks tool with simulator?
I want to detect if there are memory leaks in my application. But the problem is that when I click to red button it show a window to chose executable, but I do not know how to point instrument\'s leak[详细]
2023-04-12 10:54 分类:问答Freeing memory in caller or callee?
A function (Say \"fun()\") allocates memory and return开发者_开发技巧s the pointer to allocated memory.[详细]
2023-04-12 06:24 分类:问答Export large rows to Excel document, in small memory footprint
I am using PHPExcel to create an Excel document, using data from a MySQL database.My script must execute in under 512MB of RAM, and I am running into trouble as my export reaches 200k records:[详细]
2023-04-12 05:04 分类:问答iOS memory debugging
I have a lazy loading UIScroll view which keeps three active pages: n-1, n and n+1 and deallocates views outside of the 3-page range. I do see that dealloc is being called for unnecessary views and ye[详细]
2023-04-12 04:27 分类:问答