39
Comments
  • 3
    Sad I cannot give more than one ++
  • 5
    Happy
    char* s1 = (char*) malloc(sizeof(char)*16);
    noises
  • 5
    Back in the day there was no allocation. You just wrote to places in memory. At least I did this assembler on a PIC micro. I think it may have been that way on Apple II as well. Never used a compiler back then. They were too expensive.
  • 3
  • 3
    I still do this on my C++ projects because it secretly makes me really happy if I can do something smart with memory
  • 0
    I don't do it in C++ as often anymore, but boy oh boy do I do it with Vulkan.
  • 0
    Job title: Garbage Collector
  • 0
    When I did stuff that involved manual mem management I feel like it's totally necessary and justified.

    But looking back on it - wow, it sure felt like a waste of time! No way it was necessary to manually mange mem for my simple C apps. It was just a language necessity they I'd much rather have done for me.

    To some extent it feels like if you give a programmer tools to control details - they will feel important - but when you take them away - you'll realise they probably weren't.
  • 0
    @jiraTicket Java does it for you. But it can also do it for you at the wrong time and cause major lag in the program. The gc just loves to dump everything at once.
  • 2
    @Demolishun Yeah pretty much every language I've used since my C and C++ days does garbage collection.
    And I've never missed manual memory management since. Feels like It's just freed up my time to focus on more relevant stuff.

    But back in the day I felt it was justified.

    I'm not doing anything particularly heavy though.
Add Comment