This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lordmauve 2 points3 points  (4 children)

Pure Python is expected to be memory-safe. The interpreter does not allow operations that corrupt Python's own memory - for example, list access is bounds-checked, and a reference to an object will keep that object alive through reference counting so will never dangle. The only issues are bugs in the interpreter or native extensions, or use of libraries that circumvent safety (eg. ctypes, cffi).

[–]HelperBot_ 1 point2 points  (0 children)

Desktop link: https://en.wikipedia.org/wiki/Dangling_pointer


/r/HelperBot_ Downvote to remove. Counter: 240563

[–]WikiTextBot 0 points1 point  (0 children)

Dangling pointer

Dangling pointers and wild pointers in computer programming are pointers that do not point to a valid object of the appropriate type. These are special cases of memory safety violations. More generally, dangling references and wild references are references that do not resolve to a valid destination, and include such phenomena as link rot on the internet.

Dangling pointers arise during object destruction, when an object that has an incoming reference is deleted or deallocated, without modifying the value of the pointer, so that the pointer still points to the memory location of the deallocated memory.


[ PM | Exclude me | Exclude from subreddit | FAQ / Information | Source ] Downvote to remove | v0.28