Exemple #1
0
        private void ReleaseInternal()
        {
            if (AllocationInfos != null)
            {
                foreach (var allocationInfo in AllocationInfos)
                {
                    _pager.ReleaseAllocationInfo(allocationInfo.BaseAddress, allocationInfo.Size);
                }
                AllocationInfos = null;
            }

            if (File != null && DisposeFileOnDispose)
            {
                File.Dispose();
                File = null;
            }

            _released = true;
        }
Exemple #2
0
        private void ReleaseInternal()
        {
            if (AllocationInfos != null)
            {
                foreach (var allocationInfo in AllocationInfos)
                {
                    _pager.ReleaseAllocationInfo(allocationInfo.BaseAddress, allocationInfo.Size);
                }
            }

            if (Files != null && DisposeFilesOnDispose)
            {
                foreach (var file in Files)
                {
                    file.Dispose();
                }

                Files = null;
            }

            Released = true;
        }