g-wrap-dev
[Top][All Lists]
Advanced

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

[YET-ANOTHER-MERGE-REQUEST] Memory leak in `out' and `caller-owned' stri


From: Ludovic Courtès
Subject: [YET-ANOTHER-MERGE-REQUEST] Memory leak in `out' and `caller-owned' strings
Date: Thu, 26 Jan 2006 17:13:59 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Hi,

Two new patches:

  patch-23
      Set the init-value of `<gw-value>''s `typespec' slot to `#f'.
  patch-24
      Fixed a memory leak for `out' and `caller-owned' `mchars' arguments.

The first one just adds an `#:init-value' for the `typespec' slot so
that it is never left unbound.

As for the second one, it fixes the leak by using
`scm_take_locale_string ()' instead of `scm_from_locale_string ()' for
`out' and `caller-owned' `mchars' arguments.

I was about to add a test function to `test-standard-spec.scm' but I
stopped when I found `gw-test-out-args' whose last argument typespec
options are `(mchars out callee-owned)'.  What can possibly be the
meaning of `out callee-owned'?

To me it's pretty clear that `out caller-owned' means "the storage
underlying the object returned will have to be freed by the caller".
But I can't see how it could be freed by the _callee_.

Andreas, can you shed some light on this test case?

Thanks in advance,
Ludovic.




reply via email to

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