Y
Hacker News
new
|
ask
|
show
|
jobs
by
delamon
73 days ago
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.
1 comments
tcfhgj
73 days ago
extra code meaning the drop implementation or something else?
link
delamon
73 days ago
Yes, I mean the code in the drop implementation.
link
tcfhgj
73 days ago
it isn't really overhead, assuming you don't forget defer ... accidentally
link