lasconic wrote
>>
>> 1) Would it (described below) be of use (should I figure out how to make
>> it
>> optional and submit a PR)?
>>
> I don't think your use case is large enough to add this in MuseScore
> itself. Adding an option doesn't help.

Probably not, thanks. 


lasconic wrote
>> 2) I may have run across a memory leak and would appreciate a pointer if
>> not
>> so I understand (and can submit an issue if it is a leak)?
> 
> You are probably right MIDIEvent misses a destructor.

I'll put an issue in.  I thought about fixing it but it may be a bit more
complicated as the _edata pointer, at least in theory, could point to
storage something else is managing. What may work is a "new" allocation in
setEData so it makes a copy, but then callers would need to dispose of their
own storage which just moves the problem back to the caller. 


lasconic wrote
>> 3) Was there an easier approach to accomplish this?
>>
> 
> I believe your implementation will output an event for each track, right?
> Do you really need this?
> I'm not sure if it would work but a NPlayEvent does have a reference to a
> note and so to its measure, no() etc...
> So maybe you don't need to store these in the Event and can do the whole
> logic in ExportMidi::write ?

YES!!!  Thank you.  It was the findMeasure buried in element which note
inherited that I missed when I first tried to do it that way.  This prunes
this down to just two tiny sections.  Thank you.




--
View this message in context: 
http://dev-list.musescore.org/Possible-new-feature-memory-leak-in-midi-output-question-tp7580206p7580209.html
Sent from the MuseScore Developer mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mscore-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mscore-developer

Reply via email to