da_cow (she/her)@feddit.org to Programmer Humor@programming.dev · 29 days agoI got to avoid memory management for quite some timefeddit.orgimagemessage-square62linkfedilinkarrow-up1345arrow-down113file-text
arrow-up1332arrow-down1imageI got to avoid memory management for quite some timefeddit.orgda_cow (she/her)@feddit.org to Programmer Humor@programming.dev · 29 days agomessage-square62linkfedilinkfile-text
Finally I have a valid reason to learn about memory management. It was also hella weird when encountering it.
minus-squareresipsaloquitur@lemmy.worldlinkfedilinkarrow-up2·27 days agoThe point of RAII is that a resource is allocated and freed in the same scope. You can free it with an explicit call to a destructor, an implicit call, or with memory allocated on the stack, just wait for the stack frame to be exited.
The point of RAII is that a resource is allocated and freed in the same scope.
You can free it with an explicit call to a destructor, an implicit call, or with memory allocated on the stack, just wait for the stack frame to be exited.