Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: mexCallMATLAB crashes in loops?
Replies: 12   Last Post: Jan 3, 2013 1:49 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Yi

Posts: 6
Registered: 12/28/12
Re: mexCallMATLAB crashes in loops?
Posted: Jan 1, 2013 12:16 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <kbu49s$3g8$1@newscl01ah.mathworks.com>...
> "Yi " <dora.zhuyi@gmail.com> wrote in message <kbt4p3$n00$1@newscl01ah.mathworks.com>...
>

> >
> > //Clean up
> > mxDestroyArray(incall[0]);
> > mxDestroyArray(mout[0]);
> > mxDestroyArray(tmp);

>
> I haven't run your code, just take a quick look, but it seems wrong to destroy TMP separately, since it belongs to INCALL[0] and already destroyed when mxDestroyArray(incall[0]) is invoked.
>
> Bruno


Thanks for your reply, Bruno. In fact, I have several trys with and without these mxDestroyArray lines and it turns out all the same. Sometimes I can see the returned variable in matlab but with no dimension information. And When I try to access it, the MATLAB crashes.



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.