Home > Back-end >  In the C standard library about smart Pointers from the problem
In the C standard library about smart Pointers from the problem

Time:11-05





Why are X resources will never release in sp2? From the alias of construction works, why do you say "ensure that the service life of two objects match"? thank you

CodePudding user response:

In sp2, sp1 to * x, release * x performed by sp1

CodePudding user response:

reference 1st floor yshuise response:
in sp2, sp1 point to * x, release * x done by sp1

Sp1 and sp2 X X is independent of two objects, sp1 X is released by sp1, sp2 X? The book says sp2 X never released
  • Related