void Destroy() { if (_handle == null) { return; } var handle = _handle; _handle = null; var valid = (_tag != null) && _tag.IsValid(); // Don't crash the finalizer; dont Destroy if parent is deleted if (valid) { _tag.Dispose(); _tag = null; if (_destroyPool) { try { svn_pools.svn_pool_destroy(handle); } catch { } } } }
/// <summary>Creates a childpool within the specified parent pool</summary> public AprPool(AprPool parentPool) { if (parentPool == null) { throw new ArgumentNullException(nameof(parentPool)); } _tag = new AprPoolTag(parentPool._tag); _parent = parentPool; _handle = svn_pools.svn_pool_create(parentPool.Handle); _destroyPool = true; }
public SvnExceptionContainer(Exception ex, apr_pool_t pool) { _id = _idValue; _exception = ex; _baton = new AprBaton <SvnExceptionContainer>(this); apr_pools.apr_pool_cleanup_register( pool, _baton.Handle, _cleanupHandle.Get(), _cleanupNullHandle.Get()); _exception = ex; }
/// <summary>Attaches to the specified pool</summary> public AprPool(apr_pool_t handle, bool destroyPool) { _handle = handle ?? throw new ArgumentNullException(nameof(handle)); _tag = new AprPoolTag(); _destroyPool = destroyPool; }
/// <summary>Creates a new root pool</summary> public AprPool() { _tag = new AprPoolTag(); _handle = svn_pools.svn_pool_create(_ultimateParentPool); _destroyPool = true; }
public static void svn_pool_destroy(apr_pool_t pool) => apr_pools.apr_pool_destroy(pool);
public static void svn_pool_clear(apr_pool_t pool) => apr_pools.apr_pool_clear(pool);
public static apr_pool_t svn_pool_create(apr_pool_t parent) => svn_pool_create_ex(parent, null);