Рет қаралды 233
►Full DLang Series Playlist: • D Language (DLang) Pro...
►Find full courses on: courses.mshah.io/
►Join as member to get perks: / @mikeshah
►Lesson Description: In this lesson I talk about RAII -- resource allocation is initialization in the D programming language. I will review how memory is created and freed with structs in D, and then we will look at classes. Overall, there is really only one rule -- just remember that structs that are stack allocated have deterministic destruction. Otherwise, you need to use some abstraction (e.g. scoped, or 'scope(exit) { obj.destroy; }, or call a 'shutdown' member function, to reclaim memory. In this lesson I do a lot of live coding to otherwise demonstrate this concept. As always, share your interesting use cases with the community in the discussion below!
►Please like and subscribe to help the channel!
►KZbin Channel: / mikeshah
►Join our free community: courses.mshah....