Skip to content

Commit

Permalink
Merge branch 'stakira:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
oxygen-dioxide authored Feb 4, 2024
2 parents 010d970 + 3b316a4 commit fcdb7e1
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions OpenUtau.Core/SingerManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,18 @@ public void ReleaseSingersNotInUse(UProject project) {
var singersInUse = new HashSet<USinger>();
foreach(var track in project.tracks){
var singer = track.Singer;
if(singer != null){
if(singer != null && singer.Found && !singersInUse.Contains(singer)) {
singersInUse.Add(singer);
}
}
//Release singers that are no longer in use
foreach(var singer in singersUsed){
if(!singersInUse.Contains(singer)){
singer.FreeMemory();
singersUsed.Remove(singer);
}
}
//Update singers used
singersUsed.UnionWith(singersInUse);
singersUsed = singersInUse;
}
}
}

0 comments on commit fcdb7e1

Please sign in to comment.