Events that uses the same sound asset (Memory usage question)


(Michael Gamil) #1

Hi, what would happen if different events (not event instances) uses the same sound asset and then I load the sample data for each event via EventDescriptor::LoadSampleData()? Would there be duplicate data loaded in memory?


(Graeme Webb) #2

No, there would not be any duplicate data in memory. Studio maintains a reference count for each sound it loads, so there is only a single copy in memory at a time. This mechanism works even across banks, for example if events in different banks share the same sound asset.


(Michael Gamil) #3

Thanks for the clear answer. Cheers.