Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.



Re: Making C++ objects persistent between mex calls, and robust.
Posted:
Jan 23, 2011 4:49 AM


"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <ihgosg$914$1@fred.mathworks.com>... > Rune Allnor <allnor@tele.ntnu.no> wrote in message <b3aa9d922fe94788a3c046ff3e6d6bca@k42g2000yqa.googlegroups.com>... > > > > > When you return back to matlab, you enter a world where > > Java is a dominant player. As I understand it, the > > matlab user interface (where you access the workspaces etc) > > are programmed in Java, in which case the Java interpterer > > starts messing things up. And the Java interpterer, too, > > interacts with the OS. Not necessarily in exactly the same > > way that the C++ compiler does, though. > > NO, Matlab uses Java engine for graphical purpose only, it does not interact with data, code, internal storing, ... so it does not mess in anyway user data as you assume. Transfer pointers and persistent variable work just fine. > > Bruno
Thanks for your help  it works now (without Integer>Double>Integer conversions). I know that the way I do all this (creating C++ memory leaks, that have to be cleaned up using Matlab...) is not very "clean" programming. But at least it works...
sabine



