apply new lifetime policy to avoid crash on exit in test/Factory
git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@340 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
parent
a17791f2c8
commit
d805e8d90b
4 changed files with 21 additions and 17 deletions
|
@ -23,12 +23,10 @@
|
||||||
|
|
||||||
#ifdef USE_SEQUENCE
|
#ifdef USE_SEQUENCE
|
||||||
#include "loki/Sequence.h"
|
#include "loki/Sequence.h"
|
||||||
using Loki::Seq;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using Loki::Functor;
|
using namespace Loki;
|
||||||
using Loki::Factory;
|
|
||||||
using Loki::SingletonHolder;
|
|
||||||
using std::cout;
|
using std::cout;
|
||||||
using std::endl;
|
using std::endl;
|
||||||
|
|
||||||
|
@ -53,7 +51,9 @@ public:
|
||||||
|
|
||||||
typedef SingletonHolder
|
typedef SingletonHolder
|
||||||
<
|
<
|
||||||
Factory< AbstractProduct, int >
|
Factory< AbstractProduct, int >,
|
||||||
|
CreateUsingNew,
|
||||||
|
FollowIntoDeath::AfterMaster<Functor<>::Impl::ObjAllocatorSingleton>::IsDestroyed
|
||||||
>
|
>
|
||||||
PFactoryNull;
|
PFactoryNull;
|
||||||
|
|
||||||
|
@ -64,10 +64,12 @@ PFactoryNull;
|
||||||
typedef SingletonHolder
|
typedef SingletonHolder
|
||||||
<
|
<
|
||||||
#ifndef USE_SEQUENCE
|
#ifndef USE_SEQUENCE
|
||||||
Factory< AbstractProduct, int, LOKI_TYPELIST_2( int, int ) >
|
Factory< AbstractProduct, int, LOKI_TYPELIST_2( int, int ) >,
|
||||||
#else
|
#else
|
||||||
Factory< AbstractProduct, int, Seq< int, int > >
|
Factory< AbstractProduct, int, Seq< int, int > >,
|
||||||
#endif
|
#endif
|
||||||
|
CreateUsingNew,
|
||||||
|
FollowIntoDeath::AfterMaster<Functor<>::Impl::ObjAllocatorSingleton>::IsDestroyed
|
||||||
>
|
>
|
||||||
PFactory;
|
PFactory;
|
||||||
|
|
||||||
|
@ -161,10 +163,12 @@ typedef
|
||||||
SingletonHolder
|
SingletonHolder
|
||||||
<
|
<
|
||||||
#ifndef USE_SEQUENCE
|
#ifndef USE_SEQUENCE
|
||||||
Factory< AbstractProduct, int,LOKI_TYPELIST_3(CreateFunctor,int,int) >
|
Factory< AbstractProduct, int,LOKI_TYPELIST_3(CreateFunctor,int,int) >,
|
||||||
#else
|
#else
|
||||||
Factory< AbstractProduct, int,Seq<CreateFunctor,int,int> >
|
Factory< AbstractProduct, int,Seq<CreateFunctor,int,int> >,
|
||||||
#endif
|
#endif
|
||||||
|
CreateUsingNew,
|
||||||
|
FollowIntoDeath::AfterMaster<Functor<>::Impl::ObjAllocatorSingleton>::IsDestroyed
|
||||||
>
|
>
|
||||||
PFactoryFunctorParm;
|
PFactoryFunctorParm;
|
||||||
|
|
||||||
|
@ -249,6 +253,9 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.6 2005/11/01 11:38:19 syntheticpp
|
||||||
|
// apply new lifetime policy to avoid crash on exit in test/Factory
|
||||||
|
//
|
||||||
// Revision 1.5 2005/10/30 14:03:23 syntheticpp
|
// Revision 1.5 2005/10/30 14:03:23 syntheticpp
|
||||||
// replace tabs space
|
// replace tabs space
|
||||||
//
|
//
|
||||||
|
|
|
@ -11,7 +11,7 @@ PrivateResource=
|
||||||
ResourceIncludes=
|
ResourceIncludes=
|
||||||
MakeIncludes=
|
MakeIncludes=
|
||||||
Compiler=
|
Compiler=
|
||||||
CppCompiler=-Wall -pedantic_@@_
|
CppCompiler=-D DEBUG_@@_-D _DEBUG_@@_-Wall -pedantic_@@_
|
||||||
Linker=
|
Linker=
|
||||||
IsCpp=1
|
IsCpp=1
|
||||||
Icon=
|
Icon=
|
||||||
|
|
|
@ -79,12 +79,11 @@ clean:
|
||||||
cd SmallObj && \
|
cd SmallObj && \
|
||||||
$(MAKE) -f $(MAKEFILE) clean
|
$(MAKE) -f $(MAKEFILE) clean
|
||||||
@cd ..
|
@cd ..
|
||||||
|
|
||||||
cd Singleton && \
|
cd Singleton && \
|
||||||
$(MAKE) -f $(MAKEFILE)-DeletableSingleton clean&& \
|
$(MAKE) -f $(MAKEFILE)-DeletableSingleton clean && \
|
||||||
$(MAKE) -f $(MAKEFILE)-Phoenix clean && \
|
$(MAKE) -f $(MAKEFILE)-Phoenix clean && \
|
||||||
$(MAKE) -f $(MAKEFILE)-Dependencies clean
|
$(MAKE) -f $(MAKEFILE)-Dependencies clean
|
||||||
|
@cd ..
|
||||||
|
|
||||||
|
|
||||||
FORCE:
|
FORCE:
|
||||||
|
|
|
@ -61,8 +61,7 @@ typedef SingletonHolder
|
||||||
<
|
<
|
||||||
MyFunctionObject,
|
MyFunctionObject,
|
||||||
CreateUsingNew,
|
CreateUsingNew,
|
||||||
FollowIntoDeath::AfterMaster<Function<>::Impl::ObjAllocatorSingleton
|
FollowIntoDeath::AfterMaster<Function<>::Impl::ObjAllocatorSingleton>::IsDestroyed
|
||||||
>::IsDestroyed
|
|
||||||
>
|
>
|
||||||
Singleton_MyFunctionObject1;
|
Singleton_MyFunctionObject1;
|
||||||
|
|
||||||
|
@ -70,8 +69,7 @@ typedef SingletonHolder
|
||||||
<
|
<
|
||||||
MyFunctionObject,
|
MyFunctionObject,
|
||||||
CreateUsingNew,
|
CreateUsingNew,
|
||||||
FollowIntoDeath::AfterMaster<Functor<>::Impl::ObjAllocatorSingleton
|
FollowIntoDeath::AfterMaster<Functor<>::Impl::ObjAllocatorSingleton>::IsDestroyed
|
||||||
>::IsDestroyed
|
|
||||||
>
|
>
|
||||||
Singleton_MyFunctionObject2;
|
Singleton_MyFunctionObject2;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue