Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9645


Ignore:
Timestamp:
Aug 13, 2013, 9:39:30 PM (11 years ago)
Author:
landauf
Message:

classIdentifier_s exists in multiple libraries - reset it everywhere if the Identifier is destroyed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core6/src/libraries/core/class/Identifier.h

    r9644 r9645  
    8585#include "core/object/Listable.h"
    8686#include "core/object/Context.h"
     87#include "core/object/Destroyable.h"
     88#include "core/object/WeakPtr.h"
    8789#include "IdentifierManager.h"
    8890#include "Super.h"
     
    104106        @note You can't directly create an Identifier, it's just the base-class of ClassIdentifier<T>.
    105107    */
    106     class _CoreExport Identifier
     108    class _CoreExport Identifier : public Destroyable
    107109    {
    108110        public:
     
    300302            {
    301303                SuperFunctionDestruction<0, T>::destroy(this);
    302                 if (classIdentifier_s == this)
    303                     classIdentifier_s = 0;
    304304            }
    305305
     
    308308
    309309            std::string typeidName_;
    310             static ClassIdentifier<T>* classIdentifier_s;
     310            static WeakPtr<ClassIdentifier<T> > classIdentifier_s;
    311311    };
    312312
    313313    template <class T>
    314     ClassIdentifier<T>* ClassIdentifier<T>::classIdentifier_s = 0;
     314    WeakPtr<ClassIdentifier<T> > ClassIdentifier<T>::classIdentifier_s;
    315315
    316316    /**
Note: See TracChangeset for help on using the changeset viewer.