Lenguador@kbin.social to Programmer Humor@kbin.social · 1 year agoPointers are greatmedia.kbin.socialimagemessage-square3fedilinkarrow-up14arrow-down10
arrow-up14arrow-down1imagePointers are greatmedia.kbin.socialLenguador@kbin.social to Programmer Humor@kbin.social · 1 year agomessage-square3fedilink
minus-squareZILtoid1991@kbin.sociallinkfedilinkarrow-up0·1 year agoThe greatest fixes to all your pointer issues: Use a debugger, so you’ll know when it happens. A simple safety check goes very far, and is easy to implement. if (refVal != null) { //Do the thing } else { //Optional in case if your reference value is uninitialized, can be useful for certain things too }
minus-squareLenguador@kbin.socialOPlinkfedilinkarrow-up0·1 year agoThe greatest fix to all your pointer issues are to use references.
minus-squareReCursing@kbin.sociallinkfedilinkarrow-up1·1 year agoOr using a different programming language that abstracts all that shit away because the people who made it are almost certainly better at memory management than I am!
The greatest fixes to all your pointer issues:
if (refVal != null) { //Do the thing } else { //Optional in case if your reference value is uninitialized, can be useful for certain things too }
The greatest fix to all your pointer issues are to use references.
Or using a different programming language that abstracts all that shit away because the people who made it are almost certainly better at memory management than I am!