C# 클래스 Accord.Imaging.MemoryManager

Internal memory manager used by image processing routines.

The memory manager supports memory allocation/deallocation caching. Caching means that memory blocks may be not freed on request, but kept for later reuse.

파일 보기 프로젝트 열기: accord-net/framework

공개 메소드들

메소드 설명
Alloc ( int size ) : IntPtr

Allocate unmanaged memory.

The method allocates requested amount of memory and returns pointer to it. It may avoid allocation in the case some caching scheme is uses and there is already enough allocated memory available.

Free ( IntPtr pointer ) : void

Free unmanaged memory.

This method may skip actual deallocation of memory and keep it for future Alloc requests, if some caching scheme is used.

FreeUnusedMemory ( ) : int

Force freeing unused memory.

Frees and removes from cache memory blocks, which are not used by users.

메소드 상세

Alloc() 공개 정적인 메소드

Allocate unmanaged memory.
The method allocates requested amount of memory and returns pointer to it. It may avoid allocation in the case some caching scheme is uses and there is already enough allocated memory available.
There is insufficient memory to satisfy the request.
public static Alloc ( int size ) : IntPtr
size int Memory size to allocate.
리턴 System.IntPtr

Free() 공개 정적인 메소드

Free unmanaged memory.
This method may skip actual deallocation of memory and keep it for future Alloc requests, if some caching scheme is used.
public static Free ( IntPtr pointer ) : void
pointer System.IntPtr Pointer to memory buffer to free.
리턴 void

FreeUnusedMemory() 공개 정적인 메소드

Force freeing unused memory.
Frees and removes from cache memory blocks, which are not used by users.
public static FreeUnusedMemory ( ) : int
리턴 int