It cannot be guaranteed that "the object referred to by t has already ceased to exist". It can only be guaranteed that the object does not have a reference. Correct?t.data is accessible therefore, it will compile fine even though the object referred to by t has already ceased to exist
[HD Pg 29, Sec. 2.1.3 - scope-and-lifespan]
Moderator: admin
-
- Posts: 95
- Joined: Sat Dec 26, 2015 6:37 pm
- Contact:
[HD Pg 29, Sec. 2.1.3 - scope-and-lifespan]
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: [HD Pg 29, Sec. 2.1.3 - scope-and-lifespan]
Yes, the programmer can only ensure that there are no references to an object. But from the perspective of the topic of this discussion, i.e. from the perspective of the lifespan scope, the object practically does not exist.
Who is online
Users browsing this forum: Google [Bot] and 6 guests