Esempio n. 1
0
        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 { }
                }
            }
        }
Esempio n. 2
0
        internal void Clear()
        {
            _tag.Ensure();

            _tag.Dispose();

            _tag = _parent != null ? new AprPoolTag(_parent._tag) : new AprPoolTag();

            svn_pools.svn_pool_clear(_handle);
        }
Esempio n. 3
0
        /// <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;
        }
Esempio n. 4
0
 /// <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;
 }
Esempio n. 5
0
 /// <summary>Creates a new root pool</summary>
 public AprPool()
 {
     _tag         = new AprPoolTag();
     _handle      = svn_pools.svn_pool_create(_ultimateParentPool);
     _destroyPool = true;
 }
Esempio n. 6
0
 public void Dispose()
 {
     _disposed = true;
     _parent   = null;
 }
Esempio n. 7
0
 public AprPoolTag(AprPoolTag parent)
 {
     _parent = parent;
 }