Thread: C++ Memory Licks

  1. #1
    Registered User
    Join Date
    Sep 2009
    Posts
    26

    C++ Memory Licks

    Hi Friends,

    I have a question!!!A memory is allocated for a variable using new in try block but its get lost when catch block ends.. Please help me out

    Thanks in Advance...

    Subhashish

  2. #2
    Webhead Spidey's Avatar
    Join Date
    Jul 2009
    Posts
    285
    Spidey out!

  3. #3
    Deprecated Dae's Avatar
    Join Date
    Oct 2004
    Location
    Canada
    Posts
    1,034
    Yum

    Post your code imo...
    Warning: Have doubt in anything I post.

    GCC 4.5, Boost 1.40, Code::Blocks 8.02, Ubuntu 9.10 010001000110000101100101

  4. #4
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Quote Originally Posted by subhashish1213 View Post
    Hi Friends,

    I have a question!!!A memory is allocated for a variable using new in try block but its get lost when catch block ends.. Please help me out

    Thanks in Advance...

    Subhashish
    Use an std::vector - problem solved.

  5. #5
    Registered User
    Join Date
    Sep 2008
    Posts
    2
    Dear OP (subhashish1213).

    In case you haven't got the word yet: It spells as "Leaks".
    "Dae" and "Sebastiani" were really kind to have responded to you...and "Spidey" too. In a way.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. available memory from task manager
    By George2 in forum Tech Board
    Replies: 10
    Last Post: 01-18-2008, 02:32 AM
  2. Replies: 4
    Last Post: 01-13-2008, 02:14 AM
  3. Question regarding Memory Leak
    By clegs in forum C++ Programming
    Replies: 29
    Last Post: 12-07-2007, 01:57 AM
  4. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  5. Shared Memory - shmget questions
    By hendler in forum C Programming
    Replies: 1
    Last Post: 11-29-2005, 02:15 AM