[MacRuby-devel] requesting advice for using Garbage Collection for a Cocoa MIDI app (so that I may use MacRuby)

Tom Jordan viresh53 at gmail.com
Wed Jul 27 16:54:32 PDT 2011


Hi,

    I'd like to use MacRuby alongside Objective-C in a MIDI app I'm writing.
 I have already had success with evaluating MacRuby files from the
AppDelegate and they work great in tandem with the rest of the code in
Objective-C.   I'm just concerned about getting further along with
application, and all of a sudden finding out that there are MIDI timing
issues that are being adversely affected by the garbage collection.  Right
now the MIDI output that the app is generating sounds tight, although the
app is simple at this point, and I'm worried that as more objects get
allocated, etc.. there may be some timing issues.  If that does happen, will
there be a way to fix that using NSThreads?  Or would I need to use pthreads
and register them with  "objc_registerThreadWithCollector()" ?    The reason
I'm asking, is that I've tried to use an open-source MIDI framework that
uses pthreads, and it will only work if GC is turned off.  I've tried to
call "objc_registerThreadWithCollector()" from that code, but it's still not
working.  At this point, I don't need to use the open source MIDI framework
since I have MIDI working anyways.. but I'm concerned about timing issues
creeping in later..

any advice is welcome...  If someone says "Your crazy for trying to write a
MIDI application using Garbage Collection", or "Don't worry, Garbage
Collection won't be a problem"... that will help immensely.. or something in
between if that's the case.. any more knowledge on this subject will
be greatly appreciated.. Thanks !

Cheers,

Tom Jordan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20110727/721096d7/attachment.html>


More information about the MacRuby-devel mailing list