Le 01/07/2020 à 18:52, Samuel Gougeon a écrit :
Le 01/07/2020 à 13:47, Stéphane Mottelet a écrit :

Right, sorry for my previous message.

But, at the user level there are very few use cases: the clear overload is only useful if some mlist fields contain some pointers to allocated data. For example sparse LU factors or Java objects.


The auto-clearing of the Java side of Java objects is already implemented (and it's documented).

I am not sure it worked perfectly before. Clement's patch is essentially dealing with this case, see e.g.:

https://codereview.scilab.org/#/c/20679/14/scilab/modules/external_objects/sci_gateway/cpp/sci_percent_EObj_clear.cpp

https://codereview.scilab.org/#/c/20679/14/scilab/modules/external_objects/src/cpp/clear.cpp

S.



I am wondering if a similar native auto-clearing could be implemented for xml and hdf5 objects. I guess that usingclear before h5close() or xmlDelete() could make memory leaking.

Samuel



_______________________________________________
users mailing list
[email protected]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users

--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
users mailing list
[email protected]
http://lists.scilab.org/mailman/listinfo/users

Reply via email to