From: Warren Young Date: August 20 2007 7:09pm Subject: Re: Eyeballs needed on new reference counted pointer template List-Archive: http://lists.mysql.com/plusplus/6960 Message-Id: <46C9E6EC.6050409@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Jonathan Wakely wrote: > > there's a race on the memory allocation in ResUse::field_types(int). I'm pretty sure the whole create-on-demand strategy used with FieldNames and FieldTypes is a crock, but I haven't put in the time to prove it yet. Aside from the thread safety implications, it means you have to test the pointer all the time to be sure it's allocated, and if not, repeat the allocation code inline. Bleh. At *minimum* we need to hide the pointer behind an accessor that wraps all this. If we can just allocate it on object creation without horrible consequences, so much the better.