diff options
author | David Robillard <d@drobilla.net> | 2012-08-15 05:24:41 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-15 05:24:41 +0000 |
commit | 5dd1d9b720993fc7813fe12fca0844f95033ff1b (patch) | |
tree | 344151dd656894340d217a8fe33f8dba53fe160f /src/server/DuplexPort.cpp | |
parent | 0a9297ed2a1622d252a389d8babc0656fedbe7fd (diff) | |
download | ingen-5dd1d9b720993fc7813fe12fca0844f95033ff1b.tar.gz ingen-5dd1d9b720993fc7813fe12fca0844f95033ff1b.tar.bz2 ingen-5dd1d9b720993fc7813fe12fca0844f95033ff1b.zip |
Use intrusive lists to store nodes and ports in their parent patch to avoid tedious allocated list node juggling.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4700 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/DuplexPort.cpp')
-rw-r--r-- | src/server/DuplexPort.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/server/DuplexPort.cpp b/src/server/DuplexPort.cpp index 349eb779..f4bf6915 100644 --- a/src/server/DuplexPort.cpp +++ b/src/server/DuplexPort.cpp @@ -48,6 +48,13 @@ DuplexPort::DuplexPort(BufferFactory& bufs, bufs.forge().make(polyphonic)); } +DuplexPort::~DuplexPort() +{ + if (is_linked()) { + parent_patch()->remove_port(*this); + } +} + bool DuplexPort::get_buffers(BufferFactory& bufs, Raul::Array<BufferRef>* buffers, |