phplay plugin

Hi
I’m making a module plugin based on XMP for phplay.

I’m not sure what the CMD_PLUGIN_CLOSE call is suppose to do…
The example (phabplugin1) segfault when trying to open a file associated with the plugin when it’s already loaded.
Could any tell me what I’m suppose to unload/clear when CMD_PLUGIN_CLOSE occur?
Thanks

/Johan

(sorry if this becomes a duplicate post… something got wrong with last posting…)