site_archiver@lists.apple.com Delivered-To: pro-apps-dev@lists.apple.com Hi Paul, - Paul On Mar 17, 2009, at 9:58 AM, Paul Miller wrote: _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/pro-apps-dev/site_archiver%40lists.ap... Can a plugin subscribe to NSTimer events, or would that be no-no? If so, a plugin could set up a periodic timer and flush caches every x minutes of inactivity or something. Though I don't know if this would play nicely with your real-time stuff. That might work. We mask timer events during playback, and I think that includes timers we didn't install. I think there's also some mach API to monitor the VSIZE usage of your process, and you might be able to use that to get notified when memory gets tight. Before starting down those roads, though, I'd encourage you to make sure you're solving a problem that affects your customers. Final Cut does set aside a certain percentage of physical memory for third-party allocations (codecs, plugins, etc) that we can't track. In our experience, sharing memory between plugin instances allows plugin memory to stay on the right side of this line, even in quite complex real-world projects. Of course, every plugin has different needs, so what works for us might not work for you. And of course, please feel free to add your voice to the requests for memory-tracking API via bugreport.apple.com. We really do pay attention to those reports, even if we can't promptly address each one. If we receive multiple requests for the same functionality, that can help us prioritize future releases. If your plugin maintains a lot of data that can be regenerated if necessary, the best thing to do is to use the singleton approach to manage the memory across multiple instances of your plugin. Of course, this breaks down if the user has multiple instances of plugins from multiple vendors, each implementing their own static pool of scratch memory. But it does greatly contain the problem. Can a plugin subscribe to NSTimer events, or would that be no-no? If so, a plugin could set up a periodic timer and flush caches every x minutes of inactivity or something. Though I don't know if this would play nicely with your real-time stuff. _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/pro-apps-dev/pschneider%40apple.com This email sent to pschneider@apple.com This email sent to site_archiver@lists.apple.com