You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a great tool. I've found, however, that the code appears to leak memory. I understand that it consumes memory to track the function calls, but when I limit scope by putting braces around a block of code which uses mocking, I still end up with an increase in memory, the size of which depends on the number of methods you are mocking. This is true even if I never actually call those methods.
`//Record initial memory footprint here:
{ //limit scope
std::vector<IMySolid*> myObjs;
Mock<IMySolid> mock;
Method(mock, getShapeCount) = 1;
Method(mock, getShapeCategory) = 1;
myObjs.push_back(&mock.get());
for (std::vector<IMySolid*>::const_iterator it = myObjs.begin(); it != myObjs.end(); it++)
{
;//don't actually call either mocked method
}
} //end of scope
//record new memory footprint here... this leads to an increase in memory of 119 bytes, when the same
code executed with the real solid results in no memory increase.`
Am I doing something wrong, or is there a memory leak?
Thanks.
The text was updated successfully, but these errors were encountered:
This is a great tool. I've found, however, that the code appears to leak memory. I understand that it consumes memory to track the function calls, but when I limit scope by putting braces around a block of code which uses mocking, I still end up with an increase in memory, the size of which depends on the number of methods you are mocking. This is true even if I never actually call those methods.
`//Record initial memory footprint here:
//record new memory footprint here... this leads to an increase in memory of 119 bytes, when the same
code executed with the real solid results in no memory increase.`
Am I doing something wrong, or is there a memory leak?
Thanks.
The text was updated successfully, but these errors were encountered: