I could have sworn this was working without error messages last week. Then I ported to Windows and the error messages appeared. So I went back to Mac OS to check and, lo, there were error messages in the Max window.
For the record: occurs on both Mac OS and Windows, Max 5.1.7 (also occurred on a 5.0.x version on Windows before I updated to make sure it wasn’t a version issue). Building on Mac with XCode 3.2.1; Windows with Visual Studio 2010.
For what it’s worth: Overdrive was off on both machines. The machine I did this on before is 1000km away so I can’t easily check the Overdrive setting. But I just switched Overdrive on here (Mac) and–hey, presto!–no error messages. Ditto on Windows. Looks like an Overdrive issue.
OK, so, why should the setting of Overdrive influence whether there are error messages when closing the TLP and, more importantly, how do I avoid the freeobject errors?
I suppose I could add code to (1) check current state of overdrive, (2) turn it on, (3) kill patcher window, and (4) restore previous Overdrive state. Surely there is an easier way?