|
@@ -169,11 +169,16 @@ implementation
|
|
|
location_get_data_ref(current_asmdata.CurrAsmList,left.location,href,false,sizeof(pint));
|
|
|
if is_open_array(resultdef) then
|
|
|
begin
|
|
|
- if third=nil then
|
|
|
- InternalError(201103063);
|
|
|
- secondpass(third);
|
|
|
- cg.g_array_rtti_helper(current_asmdata.CurrAsmList,tarraydef(resultdef).elementdef,
|
|
|
- href,third.location,'FPC_DECREF_ARRAY');
|
|
|
+ { if elementdef is not managed, omit fpc_decref_array
|
|
|
+ because it won't do anything anyway }
|
|
|
+ if is_managed_type(tarraydef(resultdef).elementdef) then
|
|
|
+ begin
|
|
|
+ if third=nil then
|
|
|
+ InternalError(201103063);
|
|
|
+ secondpass(third);
|
|
|
+ cg.g_array_rtti_helper(current_asmdata.CurrAsmList,tarraydef(resultdef).elementdef,
|
|
|
+ href,third.location,'FPC_DECREF_ARRAY');
|
|
|
+ end;
|
|
|
end
|
|
|
else
|
|
|
cg.g_decrrefcount(current_asmdata.CurrAsmList,left.resultdef,href);
|