TCriteria is not freed automatically

Thanks for the info.

SubCriteria is tricky, it returns another TCriteria object that represents the sub criteria being created. It's a different object, and that's what you are passing to SetSourceCriteria.

Use this and you should be fine:

 MyAureliusDataSet.SetSourceCriteria(lCriteria.Root);

We will actually do that internally in dataset so your original code will work in next release, but in the meanwhile you can use that as a workaround.