×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Jul 2007
    Posts
    114

    key word "delete" and User::Free difference

    hi:

    what is the difference between key word "delete" and function User::Free(TAny* )?

    it seems that delete will call the class destructor but User::Free(TAny*) does not call the destructor but simply free the cell memory..Am i right?

    By the way, under which situation that destructor will be called?

    thank you

  2. #2
    Super Contributor
    Join Date
    Oct 2005
    Posts
    739

    Re: key word "delete" and User::Free difference

    Quote Originally Posted by sandy_zeng View Post
    hi:

    what is the difference between key word "delete" and function User::Free(TAny* )?

    it seems that delete will call the class destructor but User::Free(TAny*) does not call the destructor but simply free the cell memory..Am i right?

    By the way, under which situation that destructor will be called?

    thank you
    Here is a very nice document from newlc about such things.

    http://newlc.com/inside-cbase-class-...tial-questions

    Regards,
    Peter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •