kyamagu / matlab-json

Use official API: https://mathworks.com/help/matlab/json-format.html
Other
52 stars 15 forks source link

Emit a warning when clearing globals #2

Closed andersjel closed 11 years ago

andersjel commented 11 years ago

Matlab clears all global variables when calling javaaddpath. We should issue a warning when this happens. The warning generated here also includes a link to the relevant documentation and tells the user what to add to the static class path to avoid this happening again.

kyamagu commented 11 years ago

Actually, javaaddpath not only clears globals but also any state information in memory, such as class constants or variables in mex functions. I'd pull your request but also add one common API that takes care of this initialization.

andersjel commented 11 years ago

Great, thanks.