-
Notifications
You must be signed in to change notification settings - Fork 4
Remove __onheap__, automatically generate free methods that clean up generics #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| mustReturn? := false | ||
| meat variables each(|vName, vDecl| | ||
| if (!vDecl getType()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Meat"? :o
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't name it but rock is fulled with amusing variable names :P
|
@Shamanas did you test this with |
|
Sorry, was out of town. I will be taking a look at what is causing the crash (from the backtrace, it seems to be coming from Type isGeneric() which is surprising). EDIT: Probably a null variable decl type |
|
Tests no longer segfault, although they do fail for some seemingly unrelated reasons Looking into it. |
This remains backwards compatible as
freeis not generated if it already exists.To start using this feature, simply declare
__destroy__instead offreemethods.The only required change in the SDK (ooc-kean) is removing the (virtual)
__destroy__call fromObject freeas well as any__onheap__keyword usage.Here is a trivial example:
Output:
EDIT:
Closes #48