29:52unique_ptr is NOT just for heap allocations | custom deleters
From the creator
Define your own deleter. The smart pointer type unique_ptr is NOT just for automating deletes of heap-allocated pointers. By specifying a custom deleter type, you can use them to clean up any resource that doesn't clean up after itself. Yes, you can delete a new, but you can also free a malloc, fclose an fopen, or deallocate an allocate for a custom allocator type (feel free to use a stack allocator!). This can be useful for interoperating with C code or code from other languages, as well as to clean up after classes or incidental data structures that don't otherwise clean up after themselves. ― mCoding with James Murphy (https://mcoding.io) Source code: https://github.com/mCodingLLC/VideosSampleCode unique_ptr intro video: https://youtu.be/AmjoK55h68Y SUPPORT ME ⭐ --------------------------------------------------- Sign up on Patreon to get your donor role and early access to videos! https://patreon.com/mCoding Feeling generous but don't have a Patreon? Donate via PayPal! (No sign up needed.) https://www.paypal.com/donate/?hosted_button_id=VJY5SLZ8BJHEE Want to donate crypto? Check out the rest of my supported donations on my website! https://mcoding.io/donate Top patrons and donors: Jameson, Laura M, Dragos C, Vahnekie, Neel R, Matt R, Johan A, Casey G, Mark M, Mutual Information, Pi BE ACTIVE IN MY COMMUNITY 😄 --------------------------------------------------- Discord: https://discord.gg/Ye9yJtZQuN Github: https://github.com/mCodingLLC/ Reddit: https://www.reddit.
Published 2023-05-09 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.
Keep exploring Learn to Code
29:52
04:07
11:04"Anti-Slop" Designs with Impeccable (a Crash Course) #5 - Enable Image Generation
Net Ninja
2:25:40
42:55Java Graphics Programming Tutorial - How To Draw Shapes, Paths, Curves, and Apply Transformations
choobtorials
08:10
18:31