Skip to content

andyferris/UnmanagedMemory.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

UnmanagedMemory.jl

This package provides two basic helpers for dealing with unmanaged memory, for example structs and arrays coming from alien C code.

UnmanagedArray is a simple AbstractArray that wraps a pointer. It's element type must be concrete and isbitstype.

The @unmanaged macro helps one create something akin to a mutable struct, which is really just a pointer with getproperty and setproperty! overloads.

@unmanaged mutable struct A <: SuperType
    x::Int
    y::Bool
end

The fields must all be concrete isbitstypes, and the type itself cannot be generic. These are similar limitations to C.

About

Convenient interaction with alien data in Julia

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages