User Tools

Site Tools


cplusplus:pointers_4_slides

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
cplusplus:pointers_4_slides [2021/10/24 02:56] – [Memory management of regular variables] mithatcplusplus:pointers_4_slides [2021/10/24 02:56] – [Memory management of dynamically allocated storage] mithat
Line 139: Line 139:
 void ninetynine() void ninetynine()
 { {
-    int *localPtr = nullptr;  // localPtr gets destroyed at end of fcn call+    int *localPtr = nullptr;  // localPtr is destroyed at end of fcn call
     localPtr = new int;       // but not dynamically allocated storage     localPtr = new int;       // but not dynamically allocated storage
  
cplusplus/pointers_4_slides.txt · Last modified: 2021/10/24 03:02 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki