-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Many many many thanks for working this out - it has been a massive time saver!!
You can avoid making the callback functions static by holding a class-level reference to the delegates, which will stop them from being garbage collected while the simulation is running. For example:
public delegate int SendChar(string callerOut, int idNum, IntPtr pointer); ... private SendChar SendCharCallback; ... SendCharCallback = new SendChar(SendCharReceive); ... ngSpice_Init(SendCharCallback, ...);
Andy
nextguyover
Metadata
Metadata
Assignees
Labels
No labels