79358023

Date: 2025-01-15 11:28:49
Score: 1.5
Natty:
Report link

One thing to be careful of when using RAII is the size of what is being created, because it's created on the stack, and the stack typically has far less memory available than the heap.

If you're not sure what the size of something is, you might be better not using RAII and creating your object on the heap, being careful to destroy it.

Reasons:
  • No code block (0.5):
  • Low reputation (1):
Posted by: Stephen Muir