Skip to content

OrsoEric/Test-Delete

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Test-Delete

Delete does not set the pointer to null

test 1 delete
Allocate and assign
pointer: 0xb81180
content: 42
Deallocate
pointer: 0xb81180
content: 42
NOTE: delete does not update the content of the pointer to NULL automatically
This means that you can use ip again without knowing the memory is no longer valid\

xTEST 2 macro to clear pointer
Allocate and assign
pointer: 0xb81090
content: 42
Deallocate
pointer: 0\

xTEST3 function to clear pointer | pointer argument
Allocate and assign
pointer: 0xb80fe0
content: 42
Deallocate
pointer: 0
NOTE: the function must have access to the address of the pointer to clear it\

xTEST4 function to clear pointer | reference argument
Allocate and assign
pointer: 0xb81040
content: 42
Deallocate
pointer: 0
Same as above, but the argument is a reference instead of a pointer
interface is the same as delete but the function can alter the original value!

About

Delete does not set the pointer to null.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages