Remove destructors from Mjs wrapper structs.

PiperOrigin-RevId: 831001833
Change-Id: I54550737a4c1cb504bf62b9bfed12d7a70434233
This commit is contained in:
Matias Manevi
2025-11-11 11:30:16 -08:00
committed by Copybara-Service
parent 6d261528e0
commit fa79276290
3 changed files with 3 additions and 63 deletions
+3 -3
View File
@@ -360,9 +360,9 @@ def build_struct_header(
with builder.struct(f"{w}"):
builder.line(f"explicit {w}({s} *ptr);")
builder.line(f"~{w}();")
if not is_mjs:
builder.line(f"~{w}();")
builder.line(f"{w}();")
if shallow_copy and not is_mjs:
@@ -427,8 +427,8 @@ def build_struct_source(
pass
# destructor
with builder.function(f"{w}::~{w}()"):
if not is_mjs:
if not is_mjs:
with builder.function(f"{w}::~{w}()"):
with builder.block("if (owned_ && ptr_)"):
delete_ptr = _delete_ptr_statement(s)
builder.line(delete_ptr)