you re leaking memory here by creating a new testmessagecenter  then not deleting it at the end of your test  if you attempted to submit this  it would be reverted due to the asan bots please make  test message center into a std  unique ptr 