changeset 19687:b95aab49b6be

imformats: memory lock function to prevent "registry" of imageIO to be cleared * image/imformats.m: imformats has a persistent variable that keeps a list of supported formats with their respective reading and writing functions. Packages are recommended to register new formats via calls to imformats(). To prevent reseting its state each time a user calls "clear all" we must lock it to memory.
author Carnë Draug <carandraug@octave.org>
date Mon, 02 Feb 2015 22:28:02 +0000
parents 5b4fd7ebcfc6
children 107ec5195a47
files scripts/image/imformats.m
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/image/imformats.m	Mon Feb 02 21:09:46 2015 +0100
+++ b/scripts/image/imformats.m	Mon Feb 02 22:28:02 2015 +0000
@@ -75,6 +75,7 @@
     print_usage ();
   endif
 
+  mlock (); # prevent formats to be removed by "clear all"
   persistent formats = default_formats ();
 
   if (nargin == 0 && nargout == 0)