Intermediate C++ Game Programming Tutorial 6

From Chilipedia
Revision as of 21:40, 15 July 2017 by Chili (Talk | contribs)

Jump to: navigation, search

This tutorial is epoch-making, DO NOT SKIP IT. The ostensive main topic for this video is destructors, but that is not where its soul lies. After learning about dtors, we are ready to discuss a matter that is at the heart of C++: RAII. This will form the bridge between low-level memory management, and high level smart objects. We also discuss the important concept of deep copying and the Rule of 3, and related to this, we review the 4 original special member functions. AND there are discussion of a bunch of other random bullshit, like converting construction for example. It's a big video is what I'm tryin' to say here.

Topics Covered

  • RAII (Resource Allocation Is Initialization)
  • Deep Copy vs. Shallow Copy
  • Rule of 3 / Rule of 0
  • Destructors
  • Special Member Functions
  • Converting Constructors
  • explicit Keyword for Constructors
  • Copy Construction with Assignment operator =
  • Constructing with () vs. with {}
  • Deleting Special Member Functions with = delete
  • Conditions when Special Members Cannot be Generated by Compiler

Notes

Video Timestamp Index

Source Code

GitHub Repo for tutorial
GitHub Repo for homework (Memesweeper)

Homework

See also