Are you sure that this works? http://www.cplusplus.com/reference/memory/make_shared/