Fix: Remove the rest of the tracks in the BKE_nlatrack_remove_and_free to free up the memory
Fix: The BKE_nlatrack_remove_and_free (#104752) unit test leaks a little memory. Cleaning up the rest of the track list to ensure everything is freed. Co-authored-by: Nate Rupsis <nrupsis@gmail.com> Pull Request #104839
This commit is contained in:
@@ -109,6 +109,11 @@ TEST(nla_track, BKE_nlatrack_remove_and_free)
|
||||
|
||||
// ensure the correct track was removed.
|
||||
EXPECT_EQ(-1, BLI_findindex(&adt.nla_tracks, track2));
|
||||
|
||||
// free the rest of the tracks, and ensure they are removed.
|
||||
BKE_nlatrack_remove_and_free(&adt.nla_tracks, track1, false);
|
||||
EXPECT_EQ(0, BLI_listbase_count(&adt.nla_tracks));
|
||||
EXPECT_EQ(-1, BLI_findindex(&adt.nla_tracks, track1));
|
||||
}
|
||||
|
||||
} // namespace blender::bke::tests
|
||||
|
||||
Reference in New Issue
Block a user