Merge "BigInteger class implementation" into tizen
[platform/framework/native/appfw.git] / src / app / FAppAppResource.cpp
index 4ce6e22..3d7474b 100644 (file)
@@ -1,5 +1,4 @@
 //
-// Open Service Platform
 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
 //
 // Licensed under the Apache License, Version 2.0 (the License);
@@ -27,6 +26,9 @@
 #include <FSec_AccessController.h>
 #include "FApp_AppResourceImpl.h"
 #include "FApp_AppInfo.h"
+#ifdef _SINGLETON_CLEANUP
+#include "FApp_LongevityManager.h"
+#endif
 
 using namespace Tizen::Base;
 using namespace Tizen::Graphics;
@@ -77,6 +79,10 @@ AppResource::GetInstance(void)
        if (pSelfAppResource == null)
        {
                pSelfAppResource = _AppResourceImpl::GetInstanceN(APP_RESOURCE_DEFAULT);
+
+#ifdef _SINGLETON_CLEANUP
+               _LongevityManager::GetInstance().RegisterOwnership(*pSelfAppResource);
+#endif
        }
 
 //     ClearLastResult();      // as this method does not register any exception.