Quitting Application

Tue 28. Nov 2017, 12:13

¿Is there any way of Quitting the application / Destroying plugin when there is an error?
I create a gigantic dictionary of data and I'd like to free the memory if there is any error since the plugin won't be usable.
Posts: 5
Joined: Thu 9. Nov 2017, 09:59

Re: Quitting Application

Tue 28. Nov 2017, 17:42

Hi Julen,

Since C# is garbage collected you might just set your reference to the dictionary to null so its memory can be collected.

You can return any non null String from the Initialize() method of the plugin if the initializer has detected an error condition and the plugin should deactivate itself.

It is good practice to hook the ProjectUnloading method to free resources when a project is closed.

The Deinitialize() method is called when articy:draft is closed, but once a plugin (and its assembly) is loaded it remains in memory and its instance might be reused. This behavior can be used to initialize static information only once.

There is a FatalExit method available but this will result in a crash packet and data loss if the data is not already saved and quits articy:draft
Code: Select all
Articy.Utils.Manifests.ApplicationManifest.FatalExit( Exception aException )
User avatar
[Articy] Peter Sabath
Articy Staff
Articy Staff
Posts: 89
Joined: Wed 23. Nov 2011, 13:58
Location: Bochum

Re: Quitting Application

Wed 29. Nov 2017, 05:59

Thank you so much! :D
Posts: 5
Joined: Thu 9. Nov 2017, 09:59

Return to articy:draft Macro Devkit

Who is online

Users browsing this forum: No registered users and 11 guests

Who We Are
Contact Us
Social Links