IronPython.Modules.MemoryHolder.CopyFrom C# (CSharp) Method

CopyFrom() public method

Copies the data in data into this MemoryHolder.
public CopyFrom ( IntPtr source, IntPtr size ) : void
source System.IntPtr
size System.IntPtr
return void
        public void CopyFrom(IntPtr source, IntPtr size) {
            NativeFunctions.CopyMemory(_data, source, size);
            GC.KeepAlive(this);
        }

Usage Example

Ejemplo n.º 1
0
        public static object CreateMemoryHolder(IntPtr data, int size)
        {
            var res = new MemoryHolder(size);

            res.CopyFrom(data, new IntPtr(size));
            return(res);
        }
All Usage Examples Of IronPython.Modules.MemoryHolder::CopyFrom