On 10/19/2023 10:32 AM, Gabriel De Luca
via QGIS-Developer wrote:
Hi German,
Thanks. Yes, it works that way. Do you know why?
Regards,Gabriel
Since nobody who really knows the code has responded yet, I'll conjecture it's a scoping issue. The underlying C++ code expects a pointer to the reference layer. If the python wrapper just passes the pointer of the object that was created in the call, the object will be out of scope after the function call returns and will be garbage collected. Someone who actually knows the code details can verify or contradict this.
_______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer