So I made my first iphone application; I want to test for memory leaks and the general feel and design of the user interface, so how do I put it on my iphone?
Hi
I am preparing my exam for computer system.
I don't quite understand how to calculate the number of address bits needed for the memory.
For example,
Suppose that a 1G x 32-bit main memory is built using 256M x 4-bit RAM chips and this memory is word-addressable.
What is the number of address bits needed for a memory module?
What is the number of address bits needed for the full memory?
And what about If the memory is byte addressable, what would be the solutions?
Many thanks
Is loading only the needed classes directly a good way of reducing the overall memory usage of a Java application?
For example:
import java.awt.Graphics;
vs
import java.awt.*;
I am somewhat new to PHP and I am wondering: How important is it to unset variables in PHP? I know in languages like C we free the allocated memory to prevent leaks, etc. By using unset on variables when I am done with them, will this significantly increase performance of my applications?
Also is there a benchmark anywhere that compares difference between using unset and not using unset?
I'm working on a desktop application that will produce several in-memory datasets as an intermediary before being committed to a database.
Obviously I'm going to try to keep the size of these to a minimum, but are there any guidelines on thresholds I shouldn't cross for good functionality on an 'average' machine?
Thanks for any help.
I need to Install a software, and this software only can run in the Windows Server system. But I don't have Windows Server, I have Ubuntu Server.
I want install a virtual machine Windows on this Ubuntu Server, but it non GUI, how can I install it?
I have a Windows 2008 R2 VPS with 1 GB of RAM. I'm using the VPS to run SQL Server 2008 Express and IIS 7.5. I've noticed that SQL Server tends to use as much memory as it can, to the detriment of other applications (and this makes sense with a server is dedicated to running SQL Server). Should I set a limit? If so, what would a reasonable level be?
I have an abstract class with a pure virtual function f() and i want to create a class inherited from that class, and also override function f(). I seperated the header file and the cpp file.
I declared the function f(int) in the header file and the definition is in the cpp file. However, the compiler says the derived class is still abstract.
How can i fix it?
I'm reading in my text book about virtual functions in C++ and my book doesn't elaborate on what exactly run-time binding is. It doesn't give me any information as to why I would need run-time binding.
Maybe the nice people at SO can provide me with some links or information?
Thanks :]
As I know that accessing an element in vector takes constant time while in map takes logarithmic time. However, storing a map takes less memory than storing a vector.
Therefore, I want to ask which one is better in general? I'm considering using one of those two in my program, which has about 1000 elements. I plan to use 3 dimensional vector, which would take 1000x1000x1000 elements.
I'm creating a reporting application, and our customers are going to need to generate some pretty big reports which require quite a bit of memory. Ive been in a re-factoring mood lately, so I was wondering what the best way to access the properties of another open form would be(The reporting viewer opens in a new form.) So far I have:
Dim form As MainSelections
form = My.Application.OpenForms(2)
yay or nay.
Thanks
I'm not sure how best to describe this (as you can clearly tell from the title) so I'll give you an example:
I have a multisite Drupal installation. Each of the sites' sitemap.xml files are located on the server at /sites/example.com/files though with a browser (and to search engines) it is accessible at example.com/sitemap.xml
I was wondering how this was achieved? Is this called Virtual Directory?
Thank you
hi,
I have the following code inside the .h file and I'm not sure what does the assignment statement do and how is it called properly?
virtual void yield() = 0;
I thought that the function returns a value of 0 by default but since this function returns void I am a little bit confused. Can anyone comment on this and maybe say how can I refer to this assignment, I mean how is it called in C++ jargon?
Thanks.
Can anybody explain how to free memory of a static member Variable? In my understanding it can only be freed if all the instances of the class are destroyed. I am a little bit helpless at this point...
Some Code to explain it:
class ball
{
private:
static SDL_Surface *ball_image;
};
//FIXME: how to free static Variable?
SDL_Surface* ball::ball_image = SDL_LoadBMP("ball.bmp");
Using the build and analyze of XCode I saw i have a memory leak in my code:
- (NSString *) doIt
{
NSString *var = [[NSString alloc] init];
return var;
}
This is of course a simplified snippet of my problem
where do i release the object?
Sorry to keep hammering on this, but I'm trying to learn :). Is this any good? And yes, I care about memory leaks. I can't find a decent way of preallocating the char*, because there simply seems to be no cross-platform way.
const string getcwd()
{
char* a_cwd = getcwd(NULL,0);
string s_cwd(a_cwd);
free(a_cwd);
return s_cwd;
}
I am using a third party tool that is pointing to images in memory with a windows handle.
The tool stats that you are responsible for freeing handle. So how would you free that handle in Delphi 7? The datatype for the handle is LONG
I've been looking into memory management a lot recently and have been looking at how events are managed, now, I'm seeing the explicit add/remove syntax for the event subscription.
I think it's pretty simple, add/remove just allows me to perform other logic when I subscribe and unsubscribe? Am I getting it, or is there more to it?
Also, while I'm here, any advice / best practices for cleaning up my event handles.
Hi
I am doing this in my Main Thread:
CCAnimation *anim; //class variable
[NSThread detachNewThreadSelector:@selector(loadAimation) toTarget:self withObject:nil];
In loadAimation:
-(void) loadAimation {
NSAutoreleasePool *autoreleasepool = [[NSAutoreleasePool alloc] init];
anim = [[CCAnimaton alloc] init];
[autoreleasepool drain];
}
And in main thread I release it:
[anim release];
Now I want to ask if this is fine regarding memory management.
In my application I need to keep track of a list of objects that are being displayed. Right now I have an NSArray with all of the NSManagedObjects. Would I be better off to store the ObjectIDs and then only request the object when I need it?
I am mainly concerned about memory at this point.
Hi,
I need to store a certain amount of data in the "char *" in C++, because I want to avoid std::string to run out of memory, when exceeding max_size(). But the data comes in data blocks from the network so I need to use reallocation every time I get the data block. Is there any elegant solution for char * reallocation and concatenation in C++?