Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
delamon
· 2mo ago · 0 comments
Yes, that would work. But you would need to carry pointer to allocator inside box and it is extra code to run for every object.
Comments
[–]
tcfhgj
2mo ago
extra code meaning the drop implementation or something else?
[–]
delamon
OP
2mo ago
Yes, I mean the code in the drop implementation.
[–]
tcfhgj
2mo ago
it isn't really overhead, assuming you don't forget defer ... accidentally