octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #59597] bogus result returned by mexCallMATLAB


From: Rik
Subject: [Octave-bug-tracker] [bug #59597] bogus result returned by mexCallMATLAB
Date: Fri, 4 Dec 2020 11:14:50 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Safari/537.36

Follow-up Comment #5, bug #59597 (project octave):

Can you add this code to the end of the mex C file?


  int i;
  for (i = 0; i < 3; i++)
    mxDestroyArray (x[i]);


This frees the memory from the heap that was allocated internally by
mexCallMATLAB.  I don't think it is necessary because it should be the case
that when the mex file finishes execution Octave reclaims any memory
associated with it.  But, if Octave is not doing that properly then it could
cause issues.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?59597>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]