Until RTSJ version 1.1 is official, some developers need a code pattern to "pin" a scoped memory; that is, to keep it from being cleared when control leaves it. This demonstrates my favorite technique (Peter).

Example Code

The programs from the Real-Time Java Platform Programming book. The programs in this tarball are updated with bug-fixes. They are also covered by the book's copyright (see the book's copyright page...basically, republishing them requires permission.)
The programs from the Real-Time Java Platform Programming: Second Edition book. They are also covered by the book's copyright (see the book's copyright page...basically, republishing them requires permission, but using them in programs only requests acknowledgement.)