1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

how do i release the memory ocupied by a?

Discussion in 'C' started by ghostonline, May 10, 2011.

  1. ghostonline

    ghostonline New Member

    Joined:
    May 10, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    int x = 10;
    int y = 12;
    int *ax = &x
    int *ay = &y
    int*a = new int;
    int temp;
     
  2. xpi0t0s

    xpi0t0s Mentor

    Joined:
    Aug 6, 2004
    Messages:
    3,012
    Likes Received:
    203
    Trophy Points:
    0
    Occupation:
    Senior Support Engineer
    Location:
    England
    Memory allocated with new is freed with delete, and new[] with delete[].
     

Share This Page