Commit 158b7dc1 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

add refcounting idea

parent fd5bb39d
......@@ -22,6 +22,9 @@
[JIT-compiled signal graph for the audio engine](#jit-compiled-signal-graph-for-the-audio-engine)
[Use ref-counting to handle object lifetimes](use-ref-counting-to-handle-object-lifetimes)
Inject Purr Data Directly into the Web
--------------------------------------
......@@ -557,3 +560,34 @@ DSP graph itself.
### Languages
C++. Knowledge of LLVM will also come in handy here.
Use ref-counting to handle object lifetimes
-------------------------------------------
### Goal
Use ref-counting to track object lifetimes in a more robust manner.
### Details
Currently there are many places in the message dispatching system where an
object may disappear before a message bound for it gets dispatched. This,
along with dynamic patching and arbitrary patch loading can easily cause
Purr Data to crash.
Additionally, this limits the possibility for reporting errors from within
a given call stack. Currently we have no way to know if any of the objects
participating in a given call still exist at the time of an error. This
means we're limited to checking after the fact for any signs of mutation
at error time, and then simply refusing to trace in that case. That prevents
valuable analytical data for the most complex error cases.
### Challenges
There aren't currently any tests for the cases where attempting to
dereference a pointer to a freed object causes a crash. Also, there are
two "stacks"-- one is the messaging system proper. The other is the
loading mechanism used to open a file or abstraction.
Additionally, Purr Data has a binding system which can dynamically bind
or unbind symbols even within a single call stack.
### Languages
C.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment