Github user jpeach commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/1095#discussion_r82898650
--- Diff: iocore/hostdb/test_RefCountCache.cc ---
@@ -48,11 +48,11 @@ class ExampleStruct : public RefCountObj
return new (malloc(sizeof(ExampleStruct) + size)) ExampleStruct();
}
- // To mark it as "deleted" (so its easy to check) we'll just mark the
idx as -1
+ // Really free the memory, we can use asan leak detection to verify it
was freed
void
free()
{
- this->idx = -1;
+ ::free(this);
--- End diff --
Need to call the destructor here.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---