RDF Facets:
qdcZdescriptionQSxHiE2cE20IE27mE20PaulE2cE20butE20youE20canE20alsoE20callE20meE20ToddE20andE20IE20wonE27tE20getE20upsetE2eE20PaulE2eToddE20E7cE2002E20AprilE2cE202007E2023E3a18E20IE20sawE20aE20veryE20interestingE20snippedE20ofE20codeE20onE20theE20newsgroupsE20theE20otherE20dayE2eE20ItE20showedE20howE20peopleE20canE20soE20easilyE20misuseE20SymbianE20programmingE20idiomsE20ifE20theyE20areE20notE20carefulEa0Ea0Ea0E20E52ArrayE3cTIntE3eE2aE20arrayE20E3dE20newE20E28E45E4ceaveE29E20E52ArrayE3cTIntE3eE3bEa0Ea0Ea0E20arrayE2dE3eAppendE281E29E3bEa0Ea0Ea0E20arrayE2dE3eAppendE282E29E3bEa0Ea0Ea0E20deleteE20arrayE3bThisE20isE20notE20theE20originalE20classE2cE20theE20originalE20E2eE2eE2eX
qdcZidentifierQSxhttpE3aE2fE2fblogsE2eforumE2enokiaE2ecomE2fblogE2fpaulE2dtoddsE2dforumE2dnokiaE2dblogE2f2007E2f04E2f02E2fuseE2dandE2dabuseE2dofE2dsymbianE2didiomsX
qdcZpublisherQUxhttpE3aE2fE2fswE2enokiaE2ecomE2fidE2fc764fd1cE2d8b06E2d499aE2d9a6aE2d17c3903d5a65E2fforumE5fnokiaE5fcrawlerE5fagentX
qdcZtitleQSxPaulE20ToddE27sE20ForumE20NokiaE20BlogE20E7cE20UseE20andE20abuseE20ofE20SymbianE20idiomsX
qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ
qdcZtypeQUqfntypeZBlogContentQ
qdcZtypeQUqfntypeZBlogE45ntryQ
qdcZtypeQUqfntypeZCommunityContentQ
qdcZtypeQUqfntypeZE52esourceQ
qdcZtypeQUqfntypeZWebpageQ
qdcZtypeQUqmarsZManagedE52esourceQ
qdcZtypeQUqwebZInformationE52esourceQ
qdcZtypeQUqwebZPageQ
qdcZtypeQUqwebZE52esourceQ
qdcZtypeQUqrdfsZE52esourceQ
qrssZdescriptionQSxHiE2cE20IE27mE20PaulE2cE20butE20youE20canE20alsoE20callE20meE20ToddE20andE20IE20wonE27tE20getE20upsetE2eE20PaulE2eToddE20E7cE2002E20AprilE2cE202007E2023E3a18E20IE20sawE20aE20veryE20interestingE20snippedE20ofE20codeE20onE20theE20newsgroupsE20theE20otherE20dayE2eE20ItE20showedE20howE20peopleE20canE20soE20easilyE20misuseE20SymbianE20programmingE20idiomsE20ifE20theyE20areE20notE20carefulEa0Ea0Ea0E20E52ArrayE3cTIntE3eE2aE20arrayE20E3dE20newE20E28E45E4ceaveE29E20E52ArrayE3cTIntE3eE3bEa0Ea0Ea0E20arrayE2dE3eAppendE281E29E3bEa0Ea0Ea0E20arrayE2dE3eAppendE282E29E3bEa0Ea0Ea0E20deleteE20arrayE3bThisE20isE20notE20theE20originalE20classE2cE20theE20originalE20E2eE2eE2eX
qfnZdistributionQUxhttpE3aE2fE2fblogsE2eforumE2enokiaE2ecomE2fX
qfnZtopicQUqfnTopicZcppQRqdcZtypeQUqrdfsZE52esourceQRqmarsZrelevanceQNx100X
qfnZtopicQUqfnTopicZseriesE5f60QRqdcZtypeQUqrdfsZE52esourceQRqmarsZrelevanceQNx100X
qfnZtopicQUqfnTopicZseriesE5f80QRqdcZtypeQUqrdfsZE52esourceQRqmarsZrelevanceQNx100X
qfnZtypeQUqfntypeZBlogContentQ
qfnZtypeQUqfntypeZBlogE45ntryQ
qfnZtypeQUqfntypeZCommunityContentQ
qfnZtypeQUqfntypeZE52esourceQ
qfnZtypeQUqfntypeZWebpageQ
qfnZupdatedQDx2007E2d06E2d06X
qfnZuserE5ftagQSxs60X
qfnZuserE5ftagQSxseriesE2d80X
qfnZuserE5ftagQSxsymbianE2dcE2bE2bX
qmarsZdescriptionQSxHiE2cE20IE27mE20PaulE2cE20butE20youE20canE20alsoE20callE20meE20ToddE20andE20IE20wonE27tE20getE20upsetE2eE20PaulE2eToddE20E7cE2002E20AprilE2cE202007E2023E3a18E20IE20sawE20aE20veryE20interestingE20snippedE20ofE20codeE20onE20theE20newsgroupsE20theE20otherE20dayE2eE20ItE20showedE20howE20peopleE20canE20soE20easilyE20misuseE20SymbianE20programmingE20idiomsE20ifE20theyE20areE20notE20carefulEa0Ea0Ea0E20E52ArrayE3cTIntE3eE2aE20arrayE20E3dE20newE20E28E45E4ceaveE29E20E52ArrayE3cTIntE3eE3bEa0Ea0Ea0E20arrayE2dE3eAppendE281E29E3bEa0Ea0Ea0E20arrayE2dE3eAppendE282E29E3bEa0Ea0Ea0E20deleteE20arrayE3bThisE20isE20notE20theE20originalE20classE2cE20theE20originalE20E2eE2eE2eX
qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX
qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ
qrdfZtypeQUqfntypeZBlogContentQ
qrdfZtypeQUqfntypeZBlogE45ntryQ
qrdfZtypeQUqfntypeZCommunityContentQ
qrdfZtypeQUqfntypeZE52esourceQ
qrdfZtypeQUqfntypeZWebpageQ
qrdfZtypeQUqmarsZManagedE52esourceQ
qrdfZtypeQUqwebZInformationE52esourceQ
qrdfZtypeQUqwebZPageQ
qrdfZtypeQUqwebZE52esourceQ
qrdfZtypeQUqrdfsZE52esourceQ
Re: Use and abuse of Symbian idioms
TwmD | 06/06/2007, 15:44
The general rule of R classes is that you should never "new" them since it should be possible to copy R classes by value. As an example and RString is a handle to a real string owned by an RStringPool object - so copying the RString would mean copying just the handle and not the whole string.
However, there are many exceptions to this rule in Symbian OS.
Here is where it gets confusing:
If you have RArray<TInt> a;
a.Append(12);
RArray<TInt> b= a;
a.Close()
RDebug::Print("%D",b[1]); <---- Does this work?
Is b still a valid copy? I.e was the RArray contents reference counted.
In my view Symbian should have used R classes only for things which derive from RHandleBase and have a clear policy for duplication and sharing accross threads and processes.
Other classes which use R prefix are usually just proxy/pimpl objects.
Another one to watch out for is:
RPointerArray - You must call ResetAndDestroy() before the call to Close() if you want all the objects delete. Close() only deletes the memory allocated to the container.