-------- Пересылаемое сообщение --------
11.12.07, 17:38, Ed Schouten ([EMAIL PROTECTED]):
* Jürg Billeter <[EMAIL PROTECTED]> wrote:
> No, POSIX fclose() works like that. The reason is that closing the file
> and releasing the allocated memory is the same operation, so the FILE
> pointer gets invalid after calling fclose() and further use of the
> pointer will lead to crashes. As written before, future versions of
> valac won't allow to call close() manually for variables using automatic
> memory management.
Indeed. Just setting the variable to `null' would be a more elegant
solution. That's what I did with the Curses bindings as well. There is
no `delwin()'. ;-)
-------- Завершение пересылаемого сообщения --------
--
Здравствуйте.
С уважением,
Денис Черемисов.
--- Begin Message ---
* Jürg Billeter <[EMAIL PROTECTED]> wrote:
> No, POSIX fclose() works like that. The reason is that closing the file
> and releasing the allocated memory is the same operation, so the FILE
> pointer gets invalid after calling fclose() and further use of the
> pointer will lead to crashes. As written before, future versions of
> valac won't allow to call close() manually for variables using automatic
> memory management.
Indeed. Just setting the variable to `null' would be a more elegant
solution. That's what I did with the Curses bindings as well. There is
no `delwin()'. ;-)
--
Ed Schouten <[EMAIL PROTECTED]>
WWW: http://g-rave.nl/
pgpnoczCLLGjR.pgp
Description: PGP signature
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list
--- End Message ---
_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list