Add missing destructor methods (C#)#109
Merged
omckeon merged 3 commits intothoth-tech:t1-2025from Jun 18, 2025
Merged
Conversation
dijidiji
approved these changes
May 14, 2025
There was a problem hiding this comment.
I've got no changes to suggest, approving.
How has this been tested?
- Copy api.json to local splaskit.io-starlight
- npm run build
- npm run preview
Confirmed that api.json has destructor methods for the following and that they show up on the site in local testing:
- FreeJson
- FreeMusic
- FreeTimer
- FreeAnimation
- FreeAnimationScript
- CloseAdc
Too many screenshots to be practical, but they all show up similarly in the API documentation:


Confirmed that the methods were generated for the following in SplashKit.cs:
- FreeJson
- FreeMusic
- FreeTimer
- FreeAnimation
- FreeAnimationScript
- CloseAdc
Oliver-Quail
approved these changes
May 20, 2025
Oliver-Quail
left a comment
There was a problem hiding this comment.
Hi @sam-stajnko,
I've read over your code changes and the previous review. I have no feedback to improve this PR. I approve this PR
omckeon
approved these changes
Jun 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
The destructor method is generally used for freeing resources and memory when a class is no longer needed by the program. Some classes are lacking a local method that allows you to call the destructor which means that if you want to call the destructor from outside the class, you need to use the function that takes a class instance as a parameter:
eg. FreeWindow(Window wnd) instead of wnd.Free()
Realistically, both should exist but there are cases where the destructor method is missing.
Fixes
The missing method attribute has been added to the header docs for the following functions:
Then the translator was ran to generate the api.json and SplashKit.cs files.
Type of change
How Has This Been Tested?
(Both of the above files are located in the generated folder)
Testing Checklist
Checklist