v1.5.0
Garbage Collection Pinning!
CSharp Garbage Collector Pinning:
Julia.Init();
JLArray myArr = new JLArray(JLType.Int64, 5); //Allocate Int64 array of length 5
var handle = myArr.Pin(); //Pin the Object
//Stuff calling Julia Functions
handle.Free(); //Optional, handle destructor will auto call it. This is in case you want it freed earlier
Julia.Exit(0);
Julia Garbage Collector Pinning:
myBasicType = SharpType("MyBasicType")
myBasicCon = SharpConstructor(myBasicType)
myBasicObj = myBasicCon()
handle = pin(myBasicObj)
#Stuff calling Sharp Functions
free(handle) #Will also auto free. You can also treat it like stream and put it in do end block