I am getting this error in one of my programs when I exit the program when running it from the IDE:
I only get this from one of my programs, so it is likely something I have done, but if you could point me in the right direction, I would very much appreciate it.
Clear was not called, and the code would not work if you did clear the dynamic where. The third line would not have the starting expression because it would have been cleared.
If you must clear first to avoid a leak, why is that usage OK?
here old_expression will be a part of new_expression so old_expression will be destroyed at destroying new_expression (i.e. table.DynamicWhere.Expression) automatically so no memory leaks will be generated.
table.DynamicWhere.Clear just calls FreeAndNil(Expression); and clears another internal variables.