Article View: borland.public.jbuilder.java.language
Article #7328Re: firing property change events: use copies or originals?
From: John McGrath TeamB
Date: Wed, 27 Jun 2001 07:29
Date: Wed, 27 Jun 2001 07:29
22 lines
1711 bytes
1711 bytes
On Tue, 26 Jun 2001 15:12:10 -0400, "dnoyeB" <lamont_gilbert @
rigidsoftware.com> wrote:
> HOwever, I am concerned about passing the old object reference
> into this event to be handed around and molested/violated. I
> would prefer to pass a copy of the object, but is this proper?
I do not think you have to create a copy, but there is no reason that
it would not work. Well behaved code should probably not be changing
the objects passed to it in a property change notification, so I do not
think it is really necessary in most cases. Depending on how many such
events are generated, it could become a performance issue if you copy
the object.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<MPG.15a34d4ad4cde13a98a2e5@forums.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.uni2.dk!newssuck.uni2.dk!dnewsReferences:
<3b38df5b$3_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,88b4b8db5c548e01 X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-06-27 00:36:59 PST From: John McGrath [TeamB] <ng-b@JPMcGrath.net> Newsgroups: borland.public.jbuilder.java.language Subject: Re: firing property change events: use copies or originals? Date: Wed, 27 Jun 2001 03:29:59 -0400 Message-ID: <MPG.15a34d4ad4cde13a98a2e5@forums.borland.com> References: <3b38df5b$3_1@dnews> X-Newsreader: MicroPlanet Gravity v2.30 NNTP-Posting-Host: 209.92.40.60 X-Trace: dnews 993626998 209.92.40.60 (27 Jun 2001 00:29:58 -0700) Lines: 22 X-Authenticated-User: jpmcgrath Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.uni2.dk!newssuck.uni2.dk!dnews