Namespaces
Variants
Actions
Revision as of 05:39, 26 July 2012 by hamishwillee (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

How to create an instance of a T–class into heap with a new operator

Jump to: navigation, search
Article Metadata

Article
Created: vin2ktalks (20 Mar 2007)
Last edited: hamishwillee (26 Jul 2012)

It is possible to create an instance of a T class with a new operator, but these precautions must be taken:

  • Instances of T classes can be safely placed into the cleanup stack, assuming that they do not contain any pointers or references to external objects. The cleanup stack handles the cleanup simply by calling User::Free().
  • Member variables are not zeroed automatically on construction. Only CBase’s new operator zeroes members.
116 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved