this post was submitted on 23 Oct 2023
568 points (96.3% liked)

Programmer Humor

32197 readers
106 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] P1r4nha@feddit.de 60 points 11 months ago (5 children)

You gotta allocate your GFs statically or this just keeps happening.

[–] Tolookah@discuss.tchncs.de 21 points 11 months ago (1 children)

I tried to declare my GF global, but she became an astronaut, and I get linking errors

[–] xmunk@sh.itjust.works 35 points 11 months ago

Mate, your GF is definitely global. I was able to access her just fine.... read AND write.

[–] agent_flounder@lemmy.world 12 points 11 months ago (1 children)

Plus you won't worry that you forget to free her

[–] xmunk@sh.itjust.works 11 points 11 months ago

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.

[–] datelmd5sum@lemmy.world 10 points 11 months ago

I'd add an imaginary boolean flag to the GF class and always have an initial GF where imaginary == True.

[–] n3cr0@lemmy.world 9 points 11 months ago (1 children)

The struct and its CRUD functions seem to be all implemented. Problem is: The Create method is never be called.

[–] P1r4nha@feddit.de 8 points 11 months ago

Might be a problem with the factory then.

[–] 30p87@feddit.de 5 points 11 months ago

*'^You gotta allocate you GF$'