[Vm-dev] [OpenSmalltalk/opensmalltalk-vm] code smell (IntelliSense C6308): realloc could cause a memory leak (#335)

Nicolas Cellier notifications at github.com
Wed Jan 2 15:12:44 UTC 2019


Tim, to be sure about understanding: `realloc` does the right thing, it leaves the original alone.
It's we, programmers that do not do the right thing: we overwrite a valid pointer with a NULL pointer. And now, there is no references to the valid pointer anymore => memory leak (+ eventually other side effects of having a NULL pointer hanging).

-- 
You are receiving this because you commented.
Reply to this email directly or view it on GitHub:
https://github.com/OpenSmalltalk/opensmalltalk-vm/issues/335#issuecomment-450888651
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20190102/44f59d14/attachment.html>


More information about the Vm-dev mailing list