slang-users mailing list

[2005 Date Index] [2005 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] Do I have to free MMT objects which are accessed from an array?



On Jul 13, 2005, at 12:08 PM, John E. Davis wrote:

Doug Burke <dburke@xxxxxxxxxxxxxxx> wrote:
  (void) SLang_pop_array_of_type (&at, my_type);

  /* access the first element */
  dims = 0;
  (void) SLang_get_array_element (at, &zero, &mmt);

I can then handle mmt as I want. The question I have is do I need to
call
SLang_free_mmt() on mmt once I've finished using it?

Yes, you have to free both the mmt and the array when you are finished.

--John


Thanks, it wasn't clear to me whether SLang_get_array_element was increasing the reference count of the mmt.

Doug


[2005 date index] [2005 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]