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

Codechange: remove C-style memory management #13639

Merged
merged 1 commit into from
Mar 3, 2025

Conversation

rubidium42
Copy link
Contributor

@rubidium42 rubidium42 commented Feb 22, 2025

Motivation / Problem

OpenTTD has been a C++ application for years and most code is using C++ memory management, except a few stragglers.

These stragglers are anything using MallocT, CallocT, ReallocT and most uses of free except when data is coming from external APIs.

Description

Implemented:

Limitations

Waiting for the PRs to get merged before the includes and unused code can finally be actually removed.

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.

  • The bug fix is important enough to be backported? (label: 'backport requested')
  • This PR touches english.txt or translations? Check the guidelines
  • This PR affects the save game format? (label 'savegame upgrade')
  • This PR affects the GS/AI API? (label 'needs review: Script API')
    • ai_changelog.hpp, game_changelog.hpp need updating.
    • The compatibility wrappers (compat_*.nut) need updating.
  • This PR affects the NewGRF API? (label 'needs review: NewGRF')

@rubidium42 rubidium42 force-pushed the bye-alloct branch 2 times, most recently from 3b07aa4 to 89acc4a Compare February 23, 2025 08:57
@github-actions github-actions bot added the work: needs rebase This Pull Request needs a rebase label Feb 23, 2025
@github-actions github-actions bot removed the work: needs rebase This Pull Request needs a rebase label Feb 23, 2025
@rubidium42 rubidium42 added this to the 15.0 milestone Feb 24, 2025
@github-actions github-actions bot added the work: needs rebase This Pull Request needs a rebase label Feb 27, 2025
@github-actions github-actions bot removed the work: needs rebase This Pull Request needs a rebase label Feb 27, 2025
@rubidium42 rubidium42 marked this pull request as ready for review March 1, 2025 08:32
@github-actions github-actions bot added the work: needs rebase This Pull Request needs a rebase label Mar 3, 2025
@github-actions github-actions bot removed the work: needs rebase This Pull Request needs a rebase label Mar 3, 2025
Copy link
Member

@TrueBrain TrueBrain left a comment

Choose a reason for hiding this comment

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

Time for some cake!

@rubidium42 rubidium42 merged commit c9624ce into OpenTTD:master Mar 3, 2025
16 checks passed
@rubidium42 rubidium42 deleted the bye-alloct branch March 3, 2025 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants