Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
vala
vala
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 701
    • Issues 701
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 38
    • Merge Requests 38
  • Operations
    • Operations
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • External Wiki
    • External Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • GNOME
  • valavala
  • Issues
  • #873

Closed
Open
Opened Nov 06, 2019 by bob@bob131

Methods annotated [DestroysInstance] on non-compact classes do not receive an owned `this' reference

Some pseudocode:

class SomeClass : Object {
  [DestroysInstance]
  public void do_thing ();
}

...

some_class_instance.do_thing ();

Expected generated C code:

_tmpxx_ = some_class_instance;
some_class_instance = NULL;
some_class_do_thing (_tmpxx_);
_g_object_unref0 (some_class_instance);

or

_tmpxx_ = _g_object_ref0 (some_class_instance);
some_class_do_thing (_tmpxx_);
_g_object_unref0 (some_class_instance);

Actual generated C code:

some_class_do_thing (some_class_instance);
_g_object_unref0 (some_class_instance);

The above results in a double-unref.

This regression was introduced by 3d83f31a

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
0.48
Milestone
0.48
Assign milestone
Time tracking
None
Due date
None
Reference: GNOME/vala#873