A bit tuning Dispose
Publish PHP Package / docker (push) Successful in 5s
Details
Publish PHP Package / docker (push) Successful in 5s
Details
This commit is contained in:
parent
ae057fecec
commit
5f9d155d1f
|
@ -363,25 +363,23 @@ Script_{{o.name|norm_name}}.Method_{{m.name}}.ReturnValue(frm, stack
|
|||
{%- for arg in o.args -%}
|
||||
{% if arg.type is instanceof('\\mtgArrType') %}
|
||||
{% if arg.type.value.name == 'any' %}
|
||||
{
|
||||
{{arg_prefix}}{{arg.name}}?.Release();
|
||||
{{arg_prefix}}{{arg.name}} = null;
|
||||
}
|
||||
{{arg_prefix}}{{arg.name}}?.Release();
|
||||
{{arg_prefix}}{{arg.name}} = default;
|
||||
{% else %}
|
||||
{
|
||||
if({{arg_prefix}}{{arg.name}} is IDisposable dsp)
|
||||
{
|
||||
dsp.Dispose();
|
||||
{{arg_prefix}}{{arg.name}} = default;
|
||||
}
|
||||
{{arg_prefix}}{{arg.name}} = default;
|
||||
}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if arg.type.name == 'any' %}
|
||||
{{arg_prefix}}{{arg.name}}?.Release();
|
||||
{{arg_prefix}}{{arg.name}}?.Release();
|
||||
{{arg_prefix}}{{arg.name}} = default;
|
||||
{% endif %}
|
||||
|
||||
|
||||
{%- endfor ~%}
|
||||
{%- endmacro -%}
|
||||
|
||||
|
|
Loading…
Reference in New Issue