Skip to main content
Participant
December 25, 2023
Answered

Shutdown hook

  • December 25, 2023
  • 1 reply
  • 423 views

Hello!

 

I am trying to get a shutdown hook added that cleans up things, maybe kills a spawned proess etc,  much like the people discussing here:

https://community.adobe.com/t5/premiere-pro-discussions/cleaning-up-processes-when-extensionunloaded/td-p/12111532

 

Is ther any prefered way to do this, that is supported across version etc?'

Hopefully our hero @Bruce Bullis  has a perfect suggestion 🙂

This topic has been closed for replies.
Correct answer Bruce Bullis

{Not sure I can live up to that billing, but...} 

Here's PProPanel's onbeforeunload() hook. 🙂

1 reply

Bruce Bullis
Community Manager
Bruce BullisCommunity ManagerCorrect answer
Community Manager
December 25, 2023

{Not sure I can live up to that billing, but...} 

Here's PProPanel's onbeforeunload() hook. 🙂

Participant
December 25, 2023

Thank you, I had already found that method but it didn't seen to work as expected, although I could have made some mistake and I'll try it out agian. I was wondering how unloading behaves in conjuction with this?

app.setExtensionPersistent("com.adobe.FFinder", 0); // 0, while testing (to enable rapid reload); 1 for "Never unload me, even when not visible."

My ideal scenario is that we can launch our extension and have stay alive until we either close Premiere or I suppose also when we right click the panel and click "Close panel".

Bruce Bullis
Community Manager
Community Manager
December 25, 2023

That hook is called when the extension is being unloaded. If you set your extension persistent, I think it'll only get unloaded at app close.