Thread: Do I need to clean up this memory?

  1. #1
    Registered User
    Join Date
    Jan 2014
    Posts
    139

    Do I need to clean up this memory?

    I am a little confused on this because I do not actually call 'new' but it is a pointer. So do I need to do anything when I am done using this object?

    Code:
    ID3v2::Tag *tag2 = file.ID3v2Tag(true);  // new is never called
    Thanks in advance.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,667
    Well you would have to read the manual page for ID3v2Tag to find out.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with memory clean up in calling function
    By karthur3 in forum C Programming
    Replies: 0
    Last Post: 03-22-2009, 01:50 PM
  2. How to Restart or Clean all Variable in memory?
    By sergioms in forum C Programming
    Replies: 5
    Last Post: 01-08-2009, 01:59 PM
  3. Will free() clean up this allocated memory?
    By simguy in forum C Programming
    Replies: 3
    Last Post: 01-18-2007, 05:21 PM
  4. Help me clean this up.
    By uriel2013 in forum C++ Programming
    Replies: 5
    Last Post: 05-03-2003, 10:50 PM