Closed rept1d closed 10 months ago
Name | Link |
---|---|
Latest commit | 536a49f282304207b704828bb07efcb3745a99ef |
Latest deploy log | https://app.netlify.com/sites/dpp-dev/deploys/658150ab8f0c1d0008420d2e |
Deploy Preview | https://deploy-preview-1043--dpp-dev.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Congrats on your first PR! I know you said you've tested this, but have you ran a unit test with this and made sure there's no errors there?
pretty sure there's already a type called event_map (a container of guild events) but apart from that looks good
pretty sure there's already a type called event_map (a container of guild events) but apart from that looks good
I don't think there is, there are only scheduled_event_map
and event_member_map
.
This PR fixes memory leaks detected by Valgrind which occur because events allocated in initialization of
eventmap
are never deallocated.These leaks are harmless because these objects are currently supposed to live for the whole duration of the program, but it's still good to not have these leaks at all. I fix them by making the pointers stored in
eventmap
(renamed toevent_map
for better readability) point to events with static storage duration. This way we also avoid unnecessary memory allocations.I should note that it seems a bit weird to me that these event objects live that long in the first place. They have no reason for that other than making the implementation simpler. It might be worth looking for a cleaner a solution in a separate PR.
Code change checklist