I thought that the delete command would free up memory I allocated. Can someone explain why it seems I still have the memory in use after delete?
class Test
{
public:
int time;
};
int main()
{
Test *e;
e = new Test;
e->time = 1;
cout << e->time << endl;
delete e;
e->time = 2;
cout << e->time << endl;...
Hi, I really need to know of a way to get the current users device:
1. Active Memory
2. Inactive Memory
3. Wired Memory
4. Free Memory
5. Total Memory.
Any information, code or anything is helpful.
Thanks In Advance.
...
How to read a tiff file's dimension (width and height) and resolution (horizontal and vertical) without first loading it into memory by using code like the following. It is too slow for big files and I don't need to manipulate them.
Image tif = Image.FromFile(@"C:\large_size.tif");
float width = tif.PhysicalDimension.Width;
float heigh...
So this is a homework assignment, and it's kind of a doozy so i'll try to TL;DR it. Basically Im making a Shared memory database with 5 files (load,query,clean,print,change)
Load loads the database from a file. (students have a first name/last name/address/telephone number)
Query lets someone "search" for a specific student
print....well...
I am writing a scraper in PHP using cURL but am experiencing some memory issues.
These memory issues arise since i am using a single cURL session to log in to a website, and then to scrape many pages.
Is there a way to 'flush' the cURL session's memory without having to close the session, open another one and re-log in?
Perhaps I coul...
I’m not sure this is the best example, but here goes. Let’s say I want to draw an object to a canvas in an Android application. I need to do some math and call a method to return screen size to figure out where to draw it since my app should support multiple screens. I really only need to do this procedure once, as every time I want t...
Hi,
While working with pointers in C, I have been experiencing a very incosistent result, I am working with a token which is a byte string which i need to make a directory path.
a token consists of the date as a prefix in the format of 20101129(2010-oct-29) and then a 20byte string follows, thus a token would look like 20101102A2D8B328CX...
So Im making a Load.c file, that basically will load a bunch of "students" into shared memory.
The students are stored in a struct that looks like this:
struct StudentInfo{
char fName[20];
char lName[20];
char telNumber[15];
char whoModified[10];
};
Anyways I need to load this in shared memory, we were given some sample code. and we a...
I'm in deep trouble. Something in my app causes a lot of properties in my app delegate to become trashed (changing contents and even object type, say an NSArray becomes an NSString...), and I can't debug it out. I can find no memory leaks or errors on my part. The only thing I've found is that all the way to ViewDidAppear for the view of...
Hello
I was analyzing my app with leaks, and i observe that some core data entity is leaking, how can a NSManagedObject leak? I thought it was managed by the operating system? Are there known leaks in core data? The line that Leaks says causes the leak is
NSMutableArray *e=[NSMutableArray arrayWithArray:[[user videos] allObjects]];
...
Bit of background for those who don't know DirectX. A vertex is not just an XYZ position, it can have other data in it as well. DirectX uses a system known as Flexible Vertex Format, FVF, to let you define what format you want your vertexs to be in. You define these by passing a number to DirectX that use bitwise or to build it up, eg (D...
I'm looking for a tutorial describing about the various memory segments of a C program like code segment, data segment etc and what type of information is stored into them (i.e. where global, static, automatic etc variables are stored and why?).
--Ravi
...
In my program, I create 100 threads, then wait for all of them to join and then repeat this operation again.
In each of the threads, I create some memory and free it. I am fairly sure, all the memory which I am creating in those threads are getting freed.
But, the SIZE output and RSS output of prstat are continously increasing. They ar...
Just like in the title, what is a contiguous memory block?
...
Hi,
I have a test app that is linked with some DLLs (or .so's). In my main app I defined a global new/delete like this:
void* operator new(size_t n)
{
....
}
void operator delete(void* p)
{
...
}
But I noticed the operators are only called for things I allocate in my main app, but not if one of the DLLs does.
How do I make ...
I am looking for a simple program that can demonstrate memory leak in Java.
Thanks.
...
Ok so im having a bit of an issue here.
basically Im reading shared memory but thats not the problem.
I have a change.c function that lets me change a struct studentdata shared memory if I enter their "ID" number.
ISSUE WAS SOLVED
...
I have this banner rotator code:
function ban_rot() {
//First preload images
// counter
var i = 0;
// create object
imageObj = new Image();
// set image list
images = new Array();
images[0] = "../Graphics/adv/1.gif"
images[1] = "../Graphics/adv/2.jpg"
// start preloading
for (i = 0; i <= im...