Skip to content

[tasimage] fix copy constructor, optimize GetMask#22027

Merged
linev merged 3 commits intoroot-project:masterfrom
linev:fix_asimage
Apr 24, 2026
Merged

[tasimage] fix copy constructor, optimize GetMask#22027
linev merged 3 commits intoroot-project:masterfrom
linev:fix_asimage

Conversation

@linev
Copy link
Copy Markdown
Member

@linev linev commented Apr 23, 2026

  1. Copy constructor and assign operator implemented wrongly.
    One should check source img to clone fScaledImage or fGreyImage

  2. Fix memory leak in assign operator - fScaledImage was cloned twice

  3. Optimize GetMask() method - required buffer size is 8 times smaller

  4. Provide DestroyScaledImage() method to unify way how image is destroyed

linev added 3 commits April 23, 2026 14:50
Allocate smaller buffer for bits
use std::vector<char>
Correctly check source image to clone fScaledImage or fGreyImage

Fix memory leak in assign operator - fScaledImage was cloned twice
Use everywhere to cleanup scaled image
Comment thread graf2d/asimage/src/TASImage.cxx
Copy link
Copy Markdown
Collaborator

@ferdymercury ferdymercury left a comment

Choose a reason for hiding this comment

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

Thanks.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 23, 2026

Test Results

    22 files      22 suites   3d 5h 6m 40s ⏱️
 3 846 tests  3 842 ✅  1 💤 3 ❌
75 944 runs  75 920 ✅ 18 💤 6 ❌

For more details on these failures, see this check.

Results for commit bd3deb0.

♻️ This comment has been updated with latest results.

@linev linev merged commit 830566e into root-project:master Apr 24, 2026
47 of 56 checks passed
@linev linev deleted the fix_asimage branch April 24, 2026 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants