https://github.com/arcemu/arcemu/pull/352/files#L5R69 assignes mHostname to the result of new [] operator. Shouldn't you use the delete [] operator then when deleting mHostname ?