Skip to content

Is it advisable to call .stop() in windowWillClose?

Hi,

this is not an issue, but actually a question that I feel a bit dumb to ask after using VLCKit for 6 years...

My app has multiple concurrent VLCKit RTSP streams and I have noticed that sometimes, very very rarely, pressing CMQ+Q to quit the app causes an hang.

While investigating the issue, I noticed that early on in my implementation I never implemented a call to .stop() when a window is closed or when the app quits. I guess I just assumed that playback would stop, and indeed it does, but revisiting this now seems "ungraceful".

Indeed, calling .stop() in my NSWindow delegate windowWillClose method seems to actually have resolved the rare hangs, but since it was an uncommon event I'm not sure it actually helped.

So, my question: should I have been calling .stop() before closing a window for all these years?

I appreciate any suggestion, thank you! –Cesare

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information