Re: [Vala] Custom array free functions
- From: Jon Rosebaugh <chairos gmail com>
- To: Luca Bruno <lethalman88 gmail com>
- Cc: vala-list gnome org, Maciej Marcin Piechotka <uzytkownik2 gmail com>
- Subject: Re: [Vala] Custom array free functions
- Date: Tue, 26 Apr 2011 02:58:23 -0700
Surely this is a violation of encapsulation? If a library provides
some structure in memory and says to free it with function foo(), then
even if foo() is the same thing as free() RIGHT NOW, that doesn't mean
it's a good idea to instead use function bar() which also happens to
be free() RIGHT NOW. Either foo or bar might change in the future, or
under some circumstances which you don't expect.
On Tue, Apr 26, 2011 at 2:55 AM, Luca Bruno <lethalman88 gmail com> wrote:
If you want to shoot yourself by ignoring that XFree() is equivalent to
free() feel free to:
1) Copy the x11.vapi on your own
2) Use pointers instead of arrays
3) Do the memory management manually by calling XFree
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]