Demonen@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 11 months agoGotta watch them nil pointers!lemmy.mlimagemessage-square24fedilinkarrow-up1584arrow-down123
arrow-up1561arrow-down1imageGotta watch them nil pointers!lemmy.mlDemonen@lemmy.ml to Programmer Humor@lemmy.mlEnglish · 11 months agomessage-square24fedilink
minus-squareP1r4nha@feddit.delinkfedilinkarrow-up58·11 months agoYou gotta allocate your GFs statically or this just keeps happening.
minus-squareTolookah@discuss.tchncs.delinkfedilinkarrow-up20·11 months agoI tried to declare my GF global, but she became an astronaut, and I get linking errors
minus-squarexmunklinkfedilinkarrow-up35·11 months agoMate, your GF is definitely global. I was able to access her just fine… read AND write.
minus-squareagent_flounder@lemmy.worldlinkfedilinkEnglisharrow-up12·11 months agoPlus you won’t worry that you forget to free her
minus-squarexmunklinkfedilinkarrow-up11·11 months 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-squaredatelmd5sum@lemmy.worldlinkfedilinkarrow-up10·11 months agoI’d add an imaginary boolean flag to the GF class and always have an initial GF where imaginary == True.
minus-squareN3Cr0@lemmy.worldlinkfedilinkarrow-up9·11 months 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·11 months agoMight be a problem with the factory then.
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.
I’d add an imaginary boolean flag to the GF class and always have an initial GF where imaginary == True.
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.
*‘^You gotta allocate you GF$’