(no title)
lieks | 4 months ago
One example would be having a big graph inside the arena. Pointers to other elements can just be plain pointers.
With "conventional RAII" you need to know if your pointer is the only pointer left to know whether to call the destructor. That requires some sort of pointer tracking.
menaerus|4 months ago
That's not really conventional in terms of RAII - this is called a shared-ptr what you're describing. In "conventional RAII" there is no pointer tracking, RAII serves the purpose of releasing the resource what that is - it doesn't have to be anything, and most of the time it isn't since many classes aren't resource classes anyway.
Panzerschrek|4 months ago