A complete object is declared reachable while the number of calls to
declare_reachable with an argument referencing the object exceeds the
number of calls to undeclare_reachable with an argument referencing the
object.
Preconditions: If p is not null, the complete object referenced by p
has been previously declared reachable, and is
live ([basic.life]) from the time of the call until the last
undeclare_reachable(p) call on the object.
It is expected that calls to declare_reachable(p) consume
a small amount of memory in addition to that occupied by the referenced object until the
matching call to undeclare_reachable(p) is encountered.
Thus, long-running programs where calls are not matched can exhibit a memory leak.
In a garbage-collecting implementation, the fact that a region in an object is
registered with declare_no_pointers() does not prevent the object from
being collected.
Effects: The n bytes starting at p no longer contain
traceable pointer locations, independent of their type.
Hence
indirection through a pointer located there is undefined if the object
it points to was created by global operatornew and not
previously declared reachable.
It is
implementation-defined
whether
get_pointer_safety returns pointer_safety::relaxed or
pointer_safety::preferred if the implementation has relaxed pointer
safety.224