From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,573be8c453ecbff4 X-Google-Attributes: gid103376,public From: Ted Dennison Subject: Re: 'Read for pointers Date: 2000/07/31 Message-ID: <8m41m1$sl8$1@nnrp1.deja.com>#1/1 X-Deja-AN: 652775037 References: <8lndgv$1om$1@nnrp1.deja.com> X-Http-Proxy: 1.0 x72.deja.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Jul 31 14:15:34 2000 GMT X-MyDeja-Info: XMYDJUIDtedennison Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.7 [en] (WinNT; I) Date: 2000-07-31T00:00:00+00:00 List-Id: In article , Stephen Leake wrote: > Ted Dennison writes: > > > type Handle is access all Instance; > > The problem is that Item is an *out* parameter. That means I won't > > have acces to the pointer's old value inside Read. There's no way I > > can put the newly read data from the stream into the Instance that > > Handle currently points to! > > But if you are reading from a stream, Handle doesn't yet point to > anything! So 'Read needs to allocate an Instance, and set Handle to > that. Not true. In my case, Handle points to some working user data that the client is continually saving off using 'Write, but may in certian situations want to restore using 'Read. It will *always* have a good (non-null) value when 'Read is called. I don't care about the previous value referenced by the pointer, but I defintely do care about the pointer's value itself. > needs; it should be free'd before the new Instance pointer is > assigned. So Handle must be a controlled type. My, this is getting fun > :). Bleach! When this is happening, its in a realtime program in a high-priority task running at 60HZ. You want me to needlessly deallocate then reallocate the same sized memory at 60Hz? Uhhh...no. -- T.E.D. http://www.telepath.com/~dennison/Ted/TED.html Sent via Deja.com http://www.deja.com/ Before you buy.