nope shouldn't be a problem because you use the same STATIC method !

well if you use instanced methods, then you should create a member variable that stores the delegate (like the static one in the example, but NOT static) !

well after you pass the delegate the wrapper, a Marshal method allows to get an IntPtr that points to the managed delegate, this delegate is then passed to the C++ API of the acknex.dll, then the acknex.dll calls the IntPtr, which then calls the delegate (this done inside of .net) ! Thus if the delegate was removed by the garbage collector, the IntPtr points to a delegate that has been removed !

In the scheduler, the delegates for particles are stored as long as they are called every frame, if a particle delegate isn't called anymore, it is automatically removed (because particle functions are called every frame !)
Other delegates for example in ent_create only have to be stored while the function is called (for example ent_create), because after this they aren't called anymore... Variables that use delgates, store the delegate and simply overwrite it when the value is changed... And the delgates that are used for the panel methods are stored in a dictionary, that removes the delegates, when the panel element is removed..


get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread