I assign an object to an NSValue like this:
[NSValue valueWithNonretainedObject:myObject];
What happens if that object gets deallocated from memory, and then I try to pull it out from that NSValue? Would the reference be nil? How could I check if the object is still there? Or would the app just crash when something like this happens?
...
Background:
I got some data encrypted with AES (ie symmetric crypto) in a database. A server side application, running on a (assumed) secure and isolated Linux box, uses this data. It reads the encrypted data from the DB, and writes back encrypted data, only dealing with the unencrypted data in memory.
So, in order to do this, the app is...
Hi all, I'm trying to work with GDI+ and I'm running into a weird memory leak. I have a vector of GdiplusBase pointers, all of them dynamically created. The odd thing is, though, is that if I try to delete the objects as GdiplusBase pointers, e.g.
vector<GdiplusBase*> gdiplus;
gdiplus.push_back(new Image(L"filename.jpg"));
delete gdiplu...
I'm trying to take a snapshot of the memory used by a large application running on both Unix / Windows. My ultimate aim would be to have a kind of chart breaking down the memory used by which area of code.
The program is split into about 30 different projects most of which are either static libraries or dynamic dlls. Some of these are w...
I have a mobile application that is suffering from slow-down over time. My hunch, (In part fed by this article,) is that this is due to fragmentation of memory slowing the app down, but I'm not sure. Here's a pretty graph of the app's memory use over time:
The 4 peaks on the graph are 4 executions of the exact same task on the app. I ...
I know that on Symbian stack size is equal to 8k. What about BlackBerry?
...
My app uses a lot of memory. Normally it runs fine, but on a loaded device that hasn't been restarted in awhile, it will be jettisoned with the infamous Low Memory error.
I would like to respond to didReceiveMemoryWarning and free up some of my caches.
But I have the problem that my app is based off of the OpenGL ES template and doesn...
While I am still new to C# I'm curious if there is a way to tell windows that it needs to set aside X memory to run this application.
While debugging (F5) I occasionally get a random "error writing to protected memory" notice, and it's usually fine for a bit after I restart the version of Visual Studio. Once in a while it takes a win...
Hi all,
I was initially dabbling with IFrames to launch a document, and found that for large files, the memory in all browsers (I first noticed this in FF) jumped to 500,000 K.
At first I thought it might have been some bad JS code that I had written, but removing all the extraneous code and just OPENING the text file still displayed ...
I want to develop an application that can retreive information such as, DLL version, DLL build mode(debug or release), info. regarding OS, memory, processer, processes/threads, program version etc. I am developing this mainly for Windows, but it'd be good if the application supports Linux too(wherever applicable).
I am basically a java ...
I was wondering how much memory does an object that inherits from "object" and has no fields/properties take ? And I guess methods don't. Right ? I am talking for .net objects.
...
here is a simple d/tango code in windows:
module d_test.d;
import tango.util.log.Trace;
import tango.core.Thread;
import tango.stdc.stdlib : malloc, free;
void main() {
Trace.formatln("Checking in...");
Thread.sleep(10);
int total_n = (100 * 1000 * 1000) / int.sizeof; // fill mem with 100MB of ints
int* armageddon = ...
I am facing scalability issues designing a new Solr cluster and I need to master to be able to handle a relatively high rate of updates with almost no reads - they can be done via slaves.
My existing Solr instance is occupying a huge amount of RAM, in fact it started swapping at only 4.5mil docs. I am interested in making the footprint ...
Is there a way in c to find out the size of dynamically allocated memory?
For e.g., Suppose I say
char* p = malloc(sizeof(char)*100);
Now is there a way to find out the size of memory associated with p?
...
I'm on Vista 64 and a blank 'WPF Application' template allocates 50MB when I press compile and run.
Surly this is way too much for an empty white box?!
Is there anything I can do to make my WPF applications less thirsty?
Jan
...
Hello,
I need to do a big database preload in a PHP webpage (which requires an ini_set of 1024MB) for a database export in CSV format (data preloaded in an array). I know this is not always the right choice but the fact is that I need to do it, so here's the main technical question :
How can I be sure that all the preloaded data is cl...
I need to provide synchronization to some members of a structure.
If the structure is something like this
struct SharedStruct {
int Value1;
int Value2;
}
and I have a global variable
SharedStruct obj;
I want that the write from a processor
obj.Value1 = 5; // Processor B
to be immediately visible to the other proce...
I have implemented a custom allocator (to be used by STL containers within my memory debugging utility, without them using my overridden new operator). Within the memory debugger I use an instance of the same allocator class to allocate the objects I need to keep track of 'normal' memory allocations. It's all working fine, but I'm not su...
I am having trouble finding a reasonable way to dump another process's memory to a file.
After extensive searching, I've been able to find a nice article at CodeProject that has *most* of the functionality I want:
Performing a hex dump of another process's memory. This does a good job of addressing permission issues and sets a good fou...
The full message that I got on the console is:
Invalid memory access of location 00000000 eip=0117f7e1
Bus error
I don't remember seeing the Java VM crashing with this before, and I wasn't running code that was particularly new. Have you ever seen this before?
I got this error running Java 1.5 on OS X. The precise version is:
java v...