mirror of https://github.com/mickael-menu/zk
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
321 B
Markdown
12 lines
321 B
Markdown
3 years ago
|
---
|
||
|
aliases: [dangling reference]
|
||
|
---
|
||
|
|
||
|
# Dangling pointers
|
||
|
|
||
|
A *dangling pointer* is a reference that is kept to freed data. With C, reading it causes a *segmentation fault*.
|
||
|
|
||
|
Rust protects against *dangling pointers* by making sure data is not freed until it goes out of scope ([Ownership in Rust](88el)).
|
||
|
|
||
|
:programming:
|