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

Re: Issues with gb.logging Logger, cannot _free


On 4/12/24 05:46, BB wrote:
Oh and by the way, I can't recall any reason why there would be a need to call _free. The output file should be closed automagically at the program exit.

(Unless there is more than one program using the same log file????

Hi Bruce,

I'm not trying to call _free directly. I am trying to free the resource, which was not properly instantiated, by setting it to Null (which calls _free automatically, correct?). A logger with an invalid output file is useless. So, if .Begin() fails, I would need to kill the logger and re-create it with a valid sink. But, it is like a ghost object. It can't be used and can't be destroyed.

BTW, you wrote that? Were you using an alias back then? ;-)


--
Lee

--- Gambas User List Netiquette [https://gambaswiki.org/wiki/doc/netiquette] ----
--- Gambas User List Archive [https://lists.gambas-basic.org/archive/user] ----


Follow-Ups:
Re: Issues with gb.logging Logger, cannot _freeBB <adamnt42@xxxxxxxxx>
References:
Issues with gb.logging Logger, cannot _freeT Lee Davidson <t.lee.davidson@xxxxxxxxx>
Re: Issues with gb.logging Logger, cannot _freeBB <adamnt42@xxxxxxxxx>