Spring.Mocking and dangling references of calls in interceptor
Hello!
We are using master version of the Spring framework and we faced following issue:
Calling Mock<X>.Free in some cases does not release the references to an objects (in mock interceptor) and manual call to Mock<X>.Reset is required before calling Mock<X>.Free.
If you run attached sample program from command-line you will see the memory leak report. So the key place for the problem is in uMockTest.pas:59. If this line gets uncommented (“LGUIF.Reset”) everything works fine.
We never had such an issue before that the “Reset” call was mandatory. Usually we always do X.Free for all of mocks in test fixture TearDown method.
Hope you will shed some light on this issue.
Thank you very much for you work and your amazing library!
Comments (4)
-
repo owner -
reporter oh, nice! I will cherry pick them and let you know. But looks exactly how I imagined the fix..
-
reporter Yes, works like a charm! Thank you very much.
-
repo owner - changed status to resolved
- Log in to comment
I am very confident that this issue has been fixed already by commits 9c402c2 and 26737ec