-
Notifications
You must be signed in to change notification settings - Fork 0
1.10
Explanation of the contents of a topic page @ Week 1 Topic 1
Objective: Managing object copies with shared pointers (does not have to be between threads)
Comment: The general problem is that an object owner does not know, when it can delete an object, which is possibly used somewhere else in the program (typically in another thread, but not necessarily). This problem should be clear to motivate attendees about the usefulness of shared pointers. The important objective to learn is that anyone can "delete" the local reference safely by decreasing the reference count.
Comment: It's too early to talk about threads, I think. We should just emphasise benefits of sharing in different code blocks in a single threaded application.
Comment: Let's postpone threads completely at this point, even though it's a typical use case.
- No, really, what are pointers?!
- What is memory management?
- Why is memory management important?
- What is a shared object?
- How to manage the lifetime of shared objects?
- What are Shared Pointers?
- When are Shared Pointers used in Qt?
Managing the lifetime of shared objects
Shared Pointers
Using Shared Pointers in Qt