3 ms·
> The bar for C++ competence in that regard is RAII. If it was that simple we'd never need kungFuDeathGrip in Gecko. Yet, we need it a lot: https://searchfox.o
by hsivonen 9y ago
> The bar for C++ competence in that regard is RAII.
If it was that simple we'd never need kungFuDeathGrip in Gecko. Yet, we need it a lot: https://searchfox.org/mozilla-central/search?q=kungfu&path= https://searchfox.org/mozilla-central/search?q=kungfu&path=
(KungFuDeathGrip is the pattern of introducing an extra RAII refcount incrementer/decrementer on the stack to avoid subsequent method calls doing something that would free an object from underneath the current stack frame.)