Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix DateTime NewObject #2784

Closed
wants to merge 3 commits into from
Closed

Fix DateTime NewObject #2784

wants to merge 3 commits into from

Conversation

josesimoes
Copy link
Member

Description

  • Replace code creating new DateTime objects with standard and straightforward approach.

Motivation and Context

  • The latest version of this code was using a much more convoluted approach (by calling generic NewObject()) instead of a simple approach considering this is a base type.
  • Because the generic NewObject() was treating DateTime objects as value types, this could have implications regarding heap management.
  • This was unveiled by tests and code analysis in the scope of Heap compaction is not working Home#1354.

How Has This Been Tested?

  • Running GC stress tests.
    [run mscorlib tests]

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • New feature (non-breaking change which adds functionality to code)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dev Containers (changes related with Dev Containers, has no impact on code or features)
  • Dependencies (update dependencies and changes associated, has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist

  • My code follows the code style of this project (only if there are changes in source code).
  • My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • I have read the CONTRIBUTING document.
  • I have tested everything locally and all new and existing tests passed (only if there are changes in source code).

@josesimoes josesimoes added the Area: Common libs Everything related with common libraries label Oct 6, 2023
@josesimoes
Copy link
Member Author

Replaced with #2794

@josesimoes josesimoes closed this Oct 19, 2023
@nfbot nfbot added invalid and removed Type: enhancement Area: Common libs Everything related with common libraries labels Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants