Bug 19217 – object.destroy doesn't handle non D interfaces correctly

Status
NEW
Severity
enhancement
Priority
P4
Component
druntime
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-09-04T11:29:08Z
Last change time
2024-12-07T13:38:34Z
Assigned to
No Owner
Creator
Jacob Carlborg
Moved to GitHub: dmd#17170 →

Comments

Comment #0 by doob — 2018-09-04T11:29:08Z
The code for "object.destroy" for interfaces looks like: void destroy(T)(T obj) if (is(T == interface)) { destroy(cast(Object)obj); } Casting an interface will only work for a D interface. There are C++, Objective-C and COM interfaces as well.
Comment #1 by doob — 2020-01-17T15:48:33Z
This issue applies to C++ and COM interface as well, not just Objective-C interfaces.
Comment #2 by robert.schadek — 2024-12-07T13:38:34Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/17170 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB