Deallocation function for mxj~ objects (like dsp_free)


    May 21 2012 | 12:33 am
    I've written C max/msp objects before and they had an exit function "dsp_free". I'd like to have something like that for my java objects as well, but can't find anything in the documentation.
    I have a bluetooth server-socket running inside the mxj~ object that needs to be closed properly upon exit, if you were wondering why.
    Thank you in advance!
    Matty

    • May 21 2012 | 9:35 am
      MSPObject (which I assume mxj~ expects - I've not used it) is a subclass of MaxObject, so you should be able to implement notifyDeleted() to get notification of the deletion of the peer mxj~ instance.
    • May 22 2012 | 7:49 pm
      When I was writing Threaded Java objects, I very rapidly learned to use notifyDeleted(). Otherwise I had threads going in the background with no way of stopping them. (That I know of).
      Could you please tell me how the bluetooth serversocket works?