EDIT: - - , , - undefined.
++ NULL ,, - , , .
, NULL , , , .
, , . , , , .
++ - .
, , , .
The C ++ compiler does not notice this , and also does not provide reference counting at runtime for objects allocated by memory, and does not check the operability of links at runtime. The compiler is just happy that you assigned the variable of the correct type to the memory referenced by
With C ++, allocating memory is not only difficult to handle, but it can also cause very serious problems. This is why reference counting is good practice, and it can also be used with C ++ with libraries allocated to it.
source
share