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

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

[Octave-bug-tracker] [bug #62459] Severe memory leak when functions are


From: Rik
Subject: [Octave-bug-tracker] [bug #62459] Severe memory leak when functions are nested
Date: Mon, 16 May 2022 18:08:27 -0400 (EDT)

Follow-up Comment #6, bug #62459 (project octave):

I tested moving the nested function outside of the main function but still in
the same m-file (which makes it a subfunction).  This case works as expected.


function retval = leak_main_fcn (p)
  R = p*rand(1);
  leak_anon_fcn = @() 1./ R;

  retval = leak_sub_fcn (leak_anon_fcn);

endfunction

  function retval = leak_sub_fcn (f)

    retval  = f () ;
  endfunction





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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