×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    4

    Series 60 documentation error regarding R classes, cleanup stack

    in the series 60 doc named "Coding Conventions", it states

    "You cannot push R-class objects onto the cleanup stack, hence they must not have a destructor."

    yet, in the sample code Utilities.cpp:

    RTestTwo two(2);
    CleanupClosePushL(two);
    CleanupStack::PopAndDestroy();

    they can't both be right.

    I'm guessing doc is correct in that R classes do not have constructors/destructors, but rather should implement open/close methods. However, doc is incorrect that these R classes can't be put on cleanup stack.

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    RE: Series 60 documentation error regarding R classes, cleanup stack

    Hi

    Thay both are right. I admit that it looks a bit confusing that there is a line Pop&Detroy... Anyway as you see you are using closePushL-function to put it into the cleanup stack, which indeed means that the R-Class object is not cleaned using delete, but Close as it should.

    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
  •  
×