|
|
User login
Feeds |
Anybody can figure out how does CBase::operator new() work?
|
|||||
| Mon, 2005-08-22 08:15 | |
|
Hi all, In Symbian SDK Doc » Symbian OS v6.1 Edition for C++ » API Reference » Basic Types » CBase, it said: Initialisation of the CBase derived object to binary zeroes through a specific CBase::operator new() - this means that members, whose initial value should be zero, do not have to be initialised in the constructor. This allows safe destruction of a partially-constructed object. It means:
Anybody know how to do that? I wanna implement the CBase in other platform, but I can't figure out how to do that? ![]() Thanks ouseka |
|
Forum posts: 122
Forum posts: 37
I had read the e32base.h e32base.inl etc., but it seems the operator new not overloaded, because while i comment all the code about operator new in e32base.h & e32base.inl,
the test code ditto still works.
ouseka
Forum posts: 46
It is as mc_woods said, you need to override operator new.
From the SDK docs:
I reccommend Effective C++ by Meyers. It has an excellent description of how it can be done.
Forum posts: 37
It's really exciting!Â
ouseka
Forum posts: 723
It's really exciting!
I would really appreciate a link to that discussion. I guess others might also be interested in that.
Gabor Torok
Software architect, Agil Eight (http://www.agileight.com/)
Blog: http://mobile-thoughts.blogspot.com/
Forum posts: 37
ouseka