mirror of
https://github.com/LMMS/lmms.git
synced 2026-03-15 12:37:45 -04:00
Replace more instances new/delete with owning types (#4245)
* Use owning types when possible. Note: the QByteArray s is detached to mimic previous behavior; detach() guarantees that the QByteArray uniquely owns its data, since otherwise it's COW. This may be relevant in case Plugin:instantiate modifies s.data() -- this way the original QString is safe. * Make m_filter a unique_ptr. * Make m_activeRenderer a unique_ptr * use std::string instead of strcpy + buffers
This commit is contained in:
@@ -53,7 +53,6 @@ NotePlayHandle::NotePlayHandle( InstrumentTrack* instrumentTrack,
|
||||
PlayHandle( TypeNotePlayHandle, _offset ),
|
||||
Note( n.length(), n.pos(), n.key(), n.getVolume(), n.getPanning(), n.detuning() ),
|
||||
m_pluginData( NULL ),
|
||||
m_filter( NULL ),
|
||||
m_instrumentTrack( instrumentTrack ),
|
||||
m_frames( 0 ),
|
||||
m_totalFramesPlayed( 0 ),
|
||||
@@ -155,8 +154,6 @@ NotePlayHandle::~NotePlayHandle()
|
||||
|
||||
m_subNotes.clear();
|
||||
|
||||
delete m_filter;
|
||||
|
||||
if( buffer() ) releaseBuffer();
|
||||
|
||||
unlock();
|
||||
|
||||
Reference in New Issue
Block a user