Demonen@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 2 years agoGotta watch them nil pointers!lemmy.mlimagemessage-square24linkfedilinkarrow-up1566arrow-down122
arrow-up1544arrow-down1imageGotta watch them nil pointers!lemmy.mlDemonen@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 2 years agomessage-square24linkfedilink
minus-squareP1r4nha@feddit.delinkfedilinkarrow-up54·2 years agoYou gotta allocate your GFs statically or this just keeps happening.
minus-squareTolookah@discuss.tchncs.delinkfedilinkarrow-up19·2 years agoI tried to declare my GF global, but she became an astronaut, and I get linking errors
minus-squarexmunk@sh.itjust.workslinkfedilinkarrow-up30·2 years agoMate, your GF is definitely global. I was able to access her just fine… read AND write.
minus-squareagent_flounder@lemmy.worldlinkfedilinkEnglisharrow-up11·2 years agoPlus you won’t worry that you forget to free her
minus-squarexmunk@sh.itjust.workslinkfedilinkarrow-up10·2 years agoAs low as my opinion on some exes may be, I still don’t believe it’s appropriate to mark them as candidates for garbage collection.
minus-squareN3Cr0@lemmy.worldlinkfedilinkarrow-up9·2 years agoThe struct and its CRUD functions seem to be all implemented. Problem is: The Create method is never be called.
minus-squareP1r4nha@feddit.delinkfedilinkarrow-up8·2 years agoMight be a problem with the factory then.
minus-squaredatelmd5sum@lemmy.worldlinkfedilinkarrow-up8·2 years agoI’d add an imaginary boolean flag to the GF class and always have an initial GF where imaginary == True.
You gotta allocate your GFs statically or this just keeps happening.
I tried to declare my GF global, but she became an astronaut, and I get linking errors
Mate, your GF is definitely global. I was able to access her just fine… read AND write.
Plus you won’t worry that you forget to free her
As low as my opinion on some exes may be, I still don’t believe it’s appropriate to mark them as candidates for garbage collection.
The struct and its CRUD functions seem to be all implemented. Problem is: The
Create
method is never be called.Might be a problem with the factory then.
I’d add an imaginary boolean flag to the GF class and always have an initial GF where imaginary == True.
*‘^You gotta allocate you GF$’