Remove __onheap__, automatically generate free methods that clean up generics#68
Remove __onheap__, automatically generate free methods that clean up generics#68alexnask wants to merge 5 commits intomagic-lang:masterfrom
Conversation
|
|
||
| mustReturn? := false | ||
| meat variables each(|vName, vDecl| | ||
| if (!vDecl getType()) { |
There was a problem hiding this comment.
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