Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor saurbh_g's Avatar
    Join Date
    Nov 2004
    Location
    Mumbai - India
    Posts
    155
    What's CS :

    Used to put pointers of automatic/local pointers on stack. So that if, App closes without clearing memory. OS will clear that memory.

    It does not call destructor as it's called by OS after app closed. Hence pushing a class object having pointers is useless.

    Why not I push objects other then automatic ? It will be much more safer.



    Saurabh

  2. #2
    Nokia Developer Expert symbianyucca's Avatar
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    28,712
    it is safe. Basically objects also needs to be derived from CBase, so their destructor will be called.

    Basically the cleanup stack, just calls the cleanup object made form the class, and if the calss is derived from CBase it will call its destructor. And if not the cleanup will be simple free operation.

    So in case your classes are experiencing problems, check the derivation thing, and if you can not use CBase as a base for your class, make your own cleanup object for it, so the cleanup stack will work correctly.

    yucca

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
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