-------- Пересылаемое сообщение -------- 11.12.07, 17:38, Ed Schouten (ed fxq nl): * Jürg Billeter <j bitron ch> 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 ---
- From: Ed Schouten <ed fxq nl>
- To: Jürg Billeter <j bitron ch>
- Cc: vala <vala-list gnome org>
- Subject: Re: [Vala] Possibly, error in code generator
- Date: Tue, 11 Dec 2007 15:38:44 +0100
* Jürg Billeter <j bitron ch> 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 <ed fxq nl> WWW: http://g-rave.nl/Attachment: pgpr344a0C0ep.pgp
Description: PGP signature_______________________________________________ Vala-list mailing list Vala-list gnome org http://mail.gnome.org/mailman/listinfo/vala-list
--- End Message ---