node-gtk icon indicating copy to clipboard operation
node-gtk copied to clipboard

node-gtk doesn't correctly handle transfer-full, in argument

Open peat-psuwit opened this issue 3 years ago • 0 comments

While investing some code for #302, I noticed that node-gtk doesn't seem to take argument's transfer mode into account while filing GIArgument. So, I wrote a test case to test that, and it seems like it's the case.

    let gstPromise = new Gst.Promise();
    let structure = Gst.Structure.newEmpty('test');
    gstPromise.reply(structure); // gstPromise now owns backing GstStructure.

    gstPromise = null;
    global.gc();

    // Causes an assertion and return false
    console.log(structure.isEqual(structure));

I've turned this into a test case for node-gtk in #303, so when it's fixed, there will be a test case ready.

peat-psuwit avatar Jun 18 '21 16:06 peat-psuwit