Issue ID: 18505
           Summary: delete deprecation message is misleading
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P1
         Component: dmd

Currently, the dprecation message for delete says:

Deprecation: The delete keyword has been deprecated.  Use object.destroy()

However, this is not complete. In order to fully replace the mechanism of
delete, you must call on the pointer.

In many cases, people have used delete and expect the memory to be freed.
Telling them that all they have to do is use destroy is not going to satisfy.

I suggest (similar to Bearophile's suggestion in issue 9433): 

use object.destroy (and optionally instead.

There is also this new function (unreleased as of 2.079, but in druntime


Reply via email to