Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Don't re-initialize D class instances in destroy!false() #3821

Merged
merged 1 commit into from
May 20, 2022

Conversation

kinke
Copy link
Contributor

@kinke kinke commented May 13, 2022

When it's explicitly not requested.

@dlang-bot
Copy link
Contributor

dlang-bot commented May 13, 2022

Thanks for your pull request and interest in making D better, @kinke! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
23129 normal object.destroy doesn't consider initialize=false on D classes

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + druntime#3821"

ljmf00
ljmf00 previously requested changes May 13, 2022
Copy link
Member

@ljmf00 ljmf00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please file an issue as this affects the end user.

@kinke
Copy link
Contributor Author

kinke commented May 13, 2022

I consider this a tiny performance improvement, not worth a changelog entry IMO.

@ljmf00
Copy link
Member

ljmf00 commented May 13, 2022

I consider this a tiny performance improvement, not worth a changelog entry IMO.

I meant an issue, not a changelog entry. From the user perspective, doing destroy!false(c) on a class and not working, assumes a bug on destroy, as it is a documented and well-defined expected behaviour.

@dkorpel
Copy link
Contributor

dkorpel commented May 20, 2022

@kinke I've filed an issue for you: https://issues.dlang.org/show_bug.cgi?id=23129

I don't have rights to commit to your branch, can you add "Fix issue 23129" to the commit message?

@dlang-bot dlang-bot added the Bug Fix Include reference to corresponding bugzilla issue label May 20, 2022
@kinke
Copy link
Contributor Author

kinke commented May 20, 2022

Cheers Dennis, done (& rebased).

@dkorpel dkorpel dismissed ljmf00’s stale review May 20, 2022 14:57

Issue filed

@dlang-bot dlang-bot merged commit a63ae87 into dlang:master May 20, 2022
@kinke kinke deleted the destroy branch May 20, 2022 16:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug Fix Include reference to corresponding bugzilla issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants