Simplify memory handling
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start with the scanner implementation and the linked watchman.lua weak-table usage, then read the related sections of ARCHITECTURE.md. Determine how the scanner currently handles owned and unowned slabs and what cleanup callbacks would need to cover. Done means memory cleanup is more uniform and the weak table can be removed if the design supports it.
Written by the indexing model from the issue text.
Description
Not sure if this will be any better but teach the scanner "class" to take a pointer to a cleanup function and a void * pointer to be passed to it.
We would pass perhaps three different kinds of function to it. One would just free owned slabs passed in from elsewhere, the other would not free unowned slabs but instead call a deallocation function for the thing that does own them (eg. a watchman response instance, for example). The other (perhaps the same as the first) would free owned slabs the scanner itself had created.
The idea of all this is to make things more uniform and consistent, and perhaps allow us to get rid of the ghastly weak table[^weak].
[^weak]: See description of where it is used and description of big picture.
- Dominant language
- Lua
- Stars
- 2.8k
- Forks
- 317
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from wincent/command-t
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
performance
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in wincent/command-t
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
[Eco] Egg Config Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
pterodactyl/game-eggs#634 ·
-
Feature Request
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Questie/QuestieTrace#33 ·