On 01-04-2011 06:32, Alex Peshkoff wrote: > On 04/01/11 07:15, Adriano dos Santos Fernandes wrote: >> On 31-03-2011 10:44, alexpeshk...@users.sourceforge.net wrote: >>> Modified: firebird/trunk/src/common/classes/ImplementHelper.h >>> >>> template <class C, int V, typename S = GlobalStorage> >>> -class StdIface : public Versioned<C, V, S> >>> +class StdIface : public C, public S >>> { >>> public: >>> - StdIface() : refCounter(1) { } >>> + StdIface() : refCounter(0) { } >>> >> In my opinion this change makes ref counter even bad that it is. Objects >> must be created live, and not depend from addRef from the caller. > Adriano, what about this change - it's absolutely correct. New object > must be created by operator new with zero reference counter. Appropriate > addRef() is done when functions returns an object. > Why?
Are you going also to make users call this to use the object: ITransaction* tra = attachment->startTransaction(); tra->addRef(); ? Adriano ------------------------------------------------------------------------------ Create and publish websites with WebMatrix Use the most popular FREE web apps or write code yourself; WebMatrix provides all the features you need to develop and publish your website. http://p.sf.net/sfu/ms-webmatrix-sf Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel