Skip to content

fix(PropertyFileConfiguration): Circular reference in Application::lo…#5323

Merged
matejk merged 3 commits intomainfrom
5322-property-circular-ref
Apr 21, 2026
Merged

fix(PropertyFileConfiguration): Circular reference in Application::lo…#5323
matejk merged 3 commits intomainfrom
5322-property-circular-ref

Conversation

@aleks-f
Copy link
Copy Markdown
Member

@aleks-f aleks-f commented Apr 18, 2026

…adConfiguration() #5322

@aleks-f aleks-f linked an issue Apr 18, 2026 that may be closed by this pull request
@aleks-f aleks-f requested a review from Copilot April 18, 2026 08:36
@aleks-f aleks-f self-assigned this Apr 18, 2026
@aleks-f aleks-f added the bug label Apr 18, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Fixes a circular reference caused by PropertyFileConfiguration retaining an owning reference to its parent configuration during Application::loadConfiguration().

Changes:

  • Replaces PropertyFileConfiguration’s stored parent from AbstractConfiguration::Ptr (owning) to a raw pointer (non-owning).
  • Updates Application to construct PropertyFileConfiguration with _pConfig directly rather than creating an aliasing Ptr.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
Util/src/PropertyFileConfiguration.cpp Stops taking ownership of the parent configuration by storing only a raw pointer.
Util/src/Application.cpp Adjusts call sites to pass _pConfig directly when creating PropertyFileConfiguration.
Util/include/Poco/Util/PropertyFileConfiguration.h Changes _pParentConfig member to a non-owning pointer and documents the lifetime assumption.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Util/src/PropertyFileConfiguration.cpp Outdated
Comment thread Util/src/PropertyFileConfiguration.cpp Outdated
Comment thread Util/src/PropertyFileConfiguration.cpp Outdated
Comment thread Util/src/Application.cpp Outdated
Comment thread Util/src/Application.cpp Outdated
Comment thread Util/include/Poco/Util/PropertyFileConfiguration.h
aleks-f and others added 3 commits April 21, 2026 08:24
…ads, regression test

Mark the three raw-pointer constructors explicit to prevent accidental
implicit conversions, and reintroduce the AbstractConfiguration::Ptr
overloads as POCO_DEPRECATED forwarders so callers written against
1.15.1/1.15.2 get a compile-time warning. Add a regression test that
verifies the parent's reference count is not bumped by child
construction or destruction, and an entry in CHANGELOG under a new
Release 1.15.3 (Unreleased) section.
@matejk matejk force-pushed the 5322-property-circular-ref branch from 9393c4b to fabe761 Compare April 21, 2026 06:24
@matejk matejk merged commit cf952af into main Apr 21, 2026
9 of 29 checks passed
@matejk matejk deleted the 5322-property-circular-ref branch April 21, 2026 06:25
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.

Circular reference in Application::loadConfiguration()

3 participants