User Profile

Collapse

Profile Sidebar

Collapse
divyabarathii
divyabarathii
Last Activity: Mar 22 '07, 08:07 AM
Joined: Feb 6 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • divyabarathii
    started a topic Memory DeAllocation
    in C

    Memory DeAllocation

    hi
    i declared a structure as shown below
    Struct Name
    {
    int *nPtr;
    float *fPtr;
    }

    In MFC, one command button click event, i added the following code and CDocClass has the structure as a member variable
    Name *str;

    In constructor it is initialized to NULL
    str = NULL
    CDocClass::OnBu ttonClicked()
    {
    if(str)
    {
    ...
    See more | Go to post

  • divyabarathii
    replied to Deallocating memory in C++
    in C
    hi
    This is the source code that i used for several times,
    for(i = 0; i < 1000; i++)
    {
    int *ptr = new int[20000];
    for(int i = 0; i < 20000; i++)ptr[i] = 0;
    delete [] ptr;
    }

    In the task manager, look at the virtual memory size,
    when i allocate memroy the virtual memroy size increases..
    and when i deallocate the virtual memory size decreases in release mode but not in...
    See more | Go to post

    Leave a comment:


  • divyabarathii
    started a topic Deallocating memory in C++
    in C

    Deallocating memory in C++

    hi
    i am working in VC++.
    In the foolowing code

    {
    int *p = NULL
    p = new int[2000];
    delete [] p;
    }

    i have allocated memeory using new and
    deallocated the meomory using delete.
    This releases the memory in release build.
    but didn't release the memory in debug mode.
    OS:Windows 2000
    Can anybody help me to find the reason?
    See more | Go to post
No activity results to display
Show More
Working...