Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • Usage Usage
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 49
    • Issues 49
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 6
    • Merge requests 6
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • UsageUsage
  • Merge requests
  • !110

storage: stop referencing variables from a lambda's parent scope

  • Review changes

  • Download
  • Patches
  • Plain diff
Open Markus Göllnitz requested to merge camelCaseNick/gnome-usage:camelCaseNick/storage-lambda-no-ref-parent-scope into master May 26, 2023
  • Overview 0
  • Commits 1
  • Pipelines 1
  • Changes 1

If a variable is referenced from outside a lambda expression, it is passed along with a struct pointer that could lead to reference cycles and double counting.

Even though, it does not happen here, there is no guarantee it won't in the future, and in fact it will with the GTK4 port.

In this case, the variable is also the sender of the signal. Therefore, the sender can be used instead.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: camelCaseNick/storage-lambda-no-ref-parent-scope