[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Freeing Previously Allocated Busses



I remembered later - there's also BusDict in my lib (ddwCommon I believe).

In emergencies, you can free specific indexes from the server's bus allocators.

// index could also be the first index in a multichannel bus
s.audioBusAllocator.free(index);

or

s.controlBusAllocator.free(firstBusIndex);

hjh

On May 6, 2009, at 5:36 PM, James Harkins wrote:

On Wed, May 6, 2009 at 9:08 AM,  <koonce@xxxxxxxxxxxxx> wrote:
What is the simplest way of freeing all allocated busses from a previous,
terminated process? Sudden termination leaves no record of the allocated
bus objects, so I can't see how to free them.

Similarly, is there a way to list the currently assigned/allocated busses
so  that I may then free them?

Nope. It's the user's responsibility to track them.

This kind of issue is exactly why I wrote PR/BP in the ddwChucklib
quark. There, you have a Process object that encompasses both the
behavior AND any resources it uses (including buses). Terminating the
process doesn't kill the process (remove it from memory) -- you
explicitly free it, and at that time, the process removes its
resources.

Processes are kept in a global collection for you so it's a lot harder
to lose track of them.

PR/BP is a pretty open framework with lots of options, but the basic
principles are simple.


: H. James Harkins
.::!:.:.......:.::........:..!.::.::...:..:...:.:.:.:..:

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman