IEmployeeServiceProxy* empSvcMock = m_Mocks.InterfaceMock<IEmployeeServiceProxy>();
m_EmpSvcMock.reset(empSvcMock); // shared_ptr because my class Client ctor expects a shared_ptr<IEmployeeServiceProxy>
Client client(m_EmpSvcMock);
how to prevent m_EmpSvcMock from being destroyed internally by HippoMock? When passing a mock to a shared_ptr, both would destroy the mock.
EDIT - Answer:
m_Mocks.ExpectCallDestructor(m_EmpSvcMock.get());
m_EmpSvcMock.reset();
In the Git version (from Assembla) you can tell it to register a destructor to be called. Added bonus is that it will warn you about functions called on it after that with a ZombieMockException, so if you do leak a pointer somewhere and it gets used you'll know with a readable error.