I'm trying to use XCode's Leaks utility to fix some memory leaks in my code. Is there a better and more understandable way to check for leaks with explanations that pinpoint the exact line and/or offer suggestions?
Another question, I'm using AVAudioRecorder in my code in one of my view controllers. Should I load the recorder in viewDidLoad or in viewWillAppear?
I have the following nested dictionaries:
Dictionary<int, Dictionary<string, object>> x;
Dictionary<int, SortedDictionary<long, Dictionary<string, object>>> y;
If I do x.Clear() and y.Clear() will all the nested objects clear and all the memory will be reused on the next garbage collection?
Or do I need to iterate on all the items and clear them manually?
If I accept a file from a MultipartRequest and call
File f = request.getFile("fileName");
Is the file written to disk (as a temp file) or is it only stored in memory at this point?
I've been thinking if there's a way how to speed up freeing memory in .NET. I'm creating a game in .NET (only managed code) where no significant graphics is needed but still I would like to write it properly in order to not to lose performance for nothing.
For example is it useful to assign null value to objects that are not longer needed? I see this in a few samples over Internet.
Thanks for answers!
Looking in Process Explorer it uses; Virtual Size: 550,000k , Working Set: 28000k
Why does my simple hello world console app use so much memory?
I take it the difference between the Working Set and Virtual Size means that difference will be paged to disk?
/I am running 64 bit XP.
Thanks
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello world");
Console.ReadLine();
}
}
previously i was using picture box and its built in utilities to draw some heavy graphics initially it works very fine but when my GUI grows its response and update time becomes enough large that it shows delays, now i want to directly write in graphics memory to resolve this problem:
first of all tell me is it a good idea if yes then i need some guide lines to do so, or any other good option will be accepted
regards,
hi ,
while going through one project , i have seen that the memory data is "8 bytes aligned"
Can anyone please give some input related to this ?
/Kanu__
I'm having some issues in allocating memory for an array dynamically in C++ within Qt SDK ... Here's for I'm doing:
int dx = 5;
QPoint * qPoint;
qPoint = new QPoint[dx+1];
However when I try to debug the code, the programs just crashes when it tries to execute the third line .... any clues ?
I need help with my application where i save a bunch of words like more than 4000 words or more in a List<[class name].
My problem is, as the number of words increases, the process in saving it in the list seems to go slower and the application uses a lot more of memory. Can you give me an advise or alternative to do this without affecting the speed of the process?
I'm working with very long time series -- hundreds of millions of data points in one series -- and am considering Cassandra as a data store. In this question, one of the Cassandra committers (the über helpful jbellis) says that Cassandra rows can be very large, and that column slicing operations are faster than row slices, hence my question: Is the row size still limited by available memory?
Hi, we are doing a flash boot, with an NFS driver from a host
machine mapped as the root directory. How to have that file system in the
flash (flash memory ) itself in linux environment ?
I want my cookie to disappear when the user closes their brower-- I've already set some promising looking properties, but my cookies pop back to live even after closing the entire browser.
HttpCookie cookie = new HttpCookie("mycookie", "abc");
cookie.HttpOnly = true; //Seems to only affect script access
cookie.Secure = true; //Seems to affect only https transport
What property or method call am I missing to achieve an in memory cookie?
I'm working on a project that will have a single table holding lots and lots of rows on either a SQL Server or SQL Azure installation. I'm trying to estimate how many rows I can store per GB. Is it a matter of simply adding up the memory size of the individual column data types? Is there other overhead to consider?
Hi,
Here is the case: I have created a test application which simply loops to load a same url for 1000 times by using HTMLLoader class from Adobe AIR. What I found is that the memory of this app keeps rising.
So is this expected? I mean it's the same URL although it get loaded for 1000 times. Does the AVM create 1000 objects behind the scene?
Couldn`t find any ActionScript native APIs even in the beta documentation, am I right supposing that this means the only way to measure CPU / memory consumption is by cooking up a custom native solution, hooking it up with AIR and making it work on each targeted platform?
Basically the aim is to be able to have this information available inside AIR and not having to use an external application for profiling, not even Flex / Flash builder.
I have some json files with 500MB.
If I use the "trivial" json.load to load its content all at once, it will consume a lot of memory.
Is there a way to read partially the file? If it was a text, line delimited file, I would be able to iterate over the lines. I am looking for analogy to it.
Any suggestions?
Thanks
I understand most Android devices have a 16mb limit (24mb on Nexus One) on the Java heap size. Is there any way a single app can use more memory than that? I know the native SDK doesn't have this limitation but I'd like to stick with Java.
Is it 1 Mb of stack per thread? Or is that just CLR threads?
I want to know the memory over head of native windows threads (c++) and CLR threads as view via Task Manager.
Thanks
I'm using the built in sqlite library on the Android platform.
I'm considering adding several general purpose fields that users will be able to use for their own custom applications, but these fields will be blank most of the time.
My question is, how much overhead will these blank fields add to my database? Do null fields even take up per record memory in sqlite? If so, how much? I don't quite understand the inner workings of a sqlite database.
It is somewhat known where .NET keeps value types in memory (mostly in stack but could be in heap in certain circumstances etc)...
My question is - where is the code of the struct?
If I have say 16 byte of data fields in the struct and a massive computation method in it - I am presuming that 16 byte will be copied in stack and the method code is stored somewhere else and is shared for all instances of the struct.
Are these presumptions correct?
Windows has VirtualAlloc, which allows you to reserve a contiguous region of address space, but not actually use any physical memory. Later when you want to use it (or part of it) you call VirtualAlloc again to commit the region of previously reserved pages.
This is actually really useful, but I want to eventually port my application to linux - so I don't want to use it if I can't port it later. Does linux have a way to do this?
Is there a generic way to cache any type of object (be in a java class, or a word document etc.) to memory or disk?
Is simply serializing the object, and retaining the file extension (if it has one) enough to rebuild the object?