403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.238
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/local/include/db5/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/local/include/db5/dbstl_inner_utility.h
/*-
 * See the file LICENSE for redistribution information.
 *
 * Copyright (c) 2009, 2013 Oracle and/or its affiliates.  All rights reserved.
 *
 * $Id$
 */

#ifndef _DB_STL_GLOBAL_INNER_OBJECT_
#define _DB_STL_GLOBAL_INNER_OBJECT_

#include "dbstl_common.h"

START_NS(dbstl)
/* 
 * This is the interface for all classes that has some global/singleton 
 * instances that will survive during the entire process lifetime and 
 * need to be deleted before process exit. Not deleting them won't make
 * a difference because they have to be alive when the process is alive,
 * they are not memory leaks. However, we will still delete them before
 * process exit, to make no memory leak reports by memory leak checkers.
 */
class _exported DbstlGlobalInnerObject
{
public:
	DbstlGlobalInnerObject(){}
	virtual ~DbstlGlobalInnerObject(){}

}; // DbstlGlobalInnerObject

void _exported register_global_object(DbstlGlobalInnerObject *gio);

// This class stores the pointer of an object allocated on heap, and when
// an instance of this class is destructed, it deletes that object.
// Any instance of this class can only be created on the heap so that we
// can control when to destruct its instances. It derives from 
// DbstlGlobalInnerObject so that we can register pointers to instances of
// this class into ResourceManager, just like other objects which implements
// the DbstlGlobalInnerObject interface. So the ultimate purpose for this
// template is to manage objects which can't implement DbstlGlobalInnerObject
// interface, like objects of Db, DbEnv, etc.
//
template<typename T>
class _exported DbstlHeapObject : public DbstlGlobalInnerObject
{
private:
	typedef DbstlHeapObject<T> self;
	T *obj;

	// Only allow creating to heap.
	DbstlHeapObject(T *obj1) { obj = obj1; }
public:
	static self *instance(T *obj1) { return new self(obj1); }
	virtual ~DbstlHeapObject() { delete obj; }
}; // DbstlHeapObject

END_NS
#endif // !_DB_STL_GLOBAL_INNER_OBJECT_


Youez - 2016 - github.com/yon3zu
LinuXploit