Part of the confusion arises from the fact that the OPs method called removeDataset(...) doesn't actually remove the dataset from the collection, it sets it to null.
Part of the reason why the internal collections are private is that there are many different collections (dataset, renderer, axis mapping etc) and they are related by index. If you actually try to remove a dataset from the plot, you will need to modify all the other collections that are related.
XYPlot not releasing resources when setting dataset to null
-
- Posts: 24
- Joined: Wed May 16, 2007 8:20 am