Hello,
I am using Ocaml for teaching a programming class at ENS Rennes in France. A student of mine reported a strange behavior. The images created from a display disappear when that display gets closed.
It does not look to be mentioned in the documentation: http://caml.inria.fr/pub/docs/manual-ocaml/libref/Graphics.html. Is it right?
Regards,
Luc.
With the X11 implementation, Graphics.image are pixmaps that lives inside the X11 server and are associated to a specific windows. Thus after closing the windows that allocated them, the pixmaps are not available anymore. I am not sure of the behavior on windows but it looks similar.
The documentation should probably be updated. Pull request are welcome at https://github.com/ocaml/ocaml . Otherwise, I would try to update it at some point in the 4.08 cycle.
Thanks, octachron.
Yes, it would be nice to improve the doc at least to flag this unexpected feature.
Luc.