🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c++
Article #115

Re: “The end of software secrecy is almost upon

#115
From: Lawrence D’Oliveiro
Date: Wed, 21 Oct 2026 01:27
18 lines
2423 bytes
On Tue, 20 Oct 2026 23:18:44 GMT, Charlie Gibbs wrote:

> On 2026-10-20, Lawrence D’Oliveiro <ldo@nz.invalid> wrote:
>
>> I find the C code I write tends to do a lot of dynamic resource
>> allocations. These can sometimes fail with errors. So error
>> recovery will invariably involve cleaning up those parts of the
>> allocations which already succeeded. Gotos are no good for this;
>> you need to exit levels of structure nesting one by one, disposing
>> of allocations as you go.
>
> I know that a lot of CS types are going to stick pins into little
> dolls that look like me for saying this, but IMHO resource pointers,
> handles, etc. should be global.

Surely any variable which is only used locally to a particular block
should be declared local to that block. Why should resource pointers
be any different?
Technical Details
Message-ID: <11b94e3$3hdo3$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
References: <11amvre$15far$1@dont-email.me> <11b5tdb$2cs5l$1@dont-email.me> <11b64cp$end$1@panix2.panix.com> <11b64hj$2faos$1@dont-email.me> <11b679m$6dl$1@panix2.panix.com> <11b6u68$2neta$1@dont-email.me> <11b6v90$2nine$3@dont-email.me> <11b87t8$379mv$1@dont-email.me> <11b8b2k$p44i$1@dont-email.me> <rXOBS.7015$5Iy.3911@fx04.iad> <11b8h83$3b48o$1@dont-email.me> <oFSBS.93666$Q3f.6740@fx05.iad>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail
From: Lawrence D’Oliveiro <ldo@nz.invalid>
Newsgroups: comp.lang.fortran,comp.lang.c++,alt.comp.lang.rust,alt.folklore.computers
Subject: Re: “The end of software secrecy is almost upon
Date: Wed, 21 Oct 2026 01:27:31 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <11b94e3$3hdo3$1@dont-email.me>
References: <11amvre$15far$1@dont-email.me> <11b5tdb$2cs5l$1@dont-email.me>
	<11b64cp$end$1@panix2.panix.com> <11b64hj$2faos$1@dont-email.me>
	<11b679m$6dl$1@panix2.panix.com> <11b6u68$2neta$1@dont-email.me>
	<11b6v90$2nine$3@dont-email.me> <11b87t8$379mv$1@dont-email.me>
	<11b8b2k$p44i$1@dont-email.me> <rXOBS.7015$5Iy.3911@fx04.iad>
	<11b8h83$3b48o$1@dont-email.me> <oFSBS.93666$Q3f.6740@fx05.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 21 Oct 2026 01:27:32 +0000 (UTC)
Injection-Info: dont-email.me;
	logging-data="3716867"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18xqEvH9XAB59njOi89iTkd"; posting-host="14e2b17baad9bafcbc21d2e918d6f68a"
User-Agent: Pan/0.165 (Kostiantynivka)
Cancel-Lock: sha1:07hDMciU6f5pgLFNrTa4IW2ypiI= sha256:/h98fuOen+qHp3uz0V683B5dFNHckxYjpM/Dm+ohqKc=
	sha1:9EaOpPoelokGKnRDN8wXCABJ58U= sha256:qOs/W0r4a8NomTWPggy02EG7afENnTsd8ZmU1UmS9Ic=