3 ms·
They are, and in a typical program you don't need to worry about leaking memory. However, it is possible to leak, e.g. if you use a reference-counted type and
by pornel 7y ago
They are, and in a typical program you don't need to worry about leaking memory.
However, it is possible to leak, e.g. if you use a reference-counted type and create a cycle. There's also Box::leak() that does what it says (it's useful for singleton-like things).