On Tuesday 12 January 2010, Chris Cannam wrote:
> An alternative solution would be to duplicate the devices when pushing
> them to m_devices at line 379 (i.e. m_devices.push_back(new
> MidiDevice(*device))).

Right then, that's what was staring me in the face the whole time.  In my head 
I'd somehow got the idea that we were, in fact, doing a new MidiDevice in 
there somewhere, rather than just pushing back a pointer to something in 
m_fileDoc.  But we weren't constructing a new MidiDevice at all, just pushing 
back the pointer, and then deleting the document whose object the pointer 
referred to.

I should have figured that out when flipping the code to put the offending 
line up top of the dtor caused a double delete in m_fileDoc instead, must have 
been when it tried to delete its studio, where these devices had already been 
deleted, but it was too late, and my head too foggy to apprehend that hint.

Oh well.

It looks much more sensible now.
-- 
D. Michael McIntyre

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Rosegarden-devel mailing list
Rosegarden-devel@lists.sourceforge.net - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to