[DLang Episode 110] D Language - Classes - part 4 of N - RAII with structs and classes
►Full DLang Series Playlist: https://www.youtube.com/playlist?list=PLvv0ScY6vfd9Fso-3cB4CGnSlW0E4btJV
►Find full courses on: https://courses.mshah.io/
►Join as member to get perks: https://www.youtube.com/channel/UCA64pZbN5Mz5NxC3SO4qpDg/join
►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!
►YouTube Channel: https://www.youtube.com/c/MikeShah
►Join our free community: https://courses.mshah.io/communities/Q29tbXVuaXR5LTI3MzAz
Видео [DLang Episode 110] D Language - Classes - part 4 of N - RAII with structs and classes канала Mike Shah
►Find full courses on: https://courses.mshah.io/
►Join as member to get perks: https://www.youtube.com/channel/UCA64pZbN5Mz5NxC3SO4qpDg/join
►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!
►YouTube Channel: https://www.youtube.com/c/MikeShah
►Join our free community: https://courses.mshah.io/communities/Q29tbXVuaXR5LTI3MzAz
Видео [DLang Episode 110] D Language - Classes - part 4 of N - RAII with structs and classes канала Mike Shah
Комментарии отсутствуют
Информация о видео
6 ноября 2024 г. 10:00:27
00:33:15
Другие видео канала