1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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