Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #15753
| From | Lew <lewbloch@gmail.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Closing/Despose of JFrame |
| Date | 2012-06-29 13:36 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <75286bae-0dd5-4fdf-a92f-272ae3430cc1@googlegroups.com> (permalink) |
| References | (1 earlier) <jshpac$3v7$1@dont-email.me> <bd012aeb-0dcf-44e3-bb8c-12dc70c8c473@googlegroups.com> <516qu75g5ipbvdjedcjb6okkckac2isbsn@4ax.com> <9dc48bd0-257c-46e3-af47-0b61e3c649e3@googlegroups.com> <5g3su7psmjjeuoe85rpfh8eu3r5uktgmnu@4ax.com> |
Gene Wirchenko wrote:
> Lew wrote:
>
> >Gene Wirchenko wrote:
> >> Lew wrote:
> >>
> >> [snip]
> >>
> >> >Read widely and carefully. There are some notable urban
> >> >legends out there, such as the advice to set all references
> >> >to 'null' when finished with them. There are specific times
> >> >to do so, such as when a collection such as a 'Stack' is
> >> >holding hidden references ("packratting", or the Java version
> >> >of a memory leak). Otherwise it's just superstition.
> >>
> >> Ah, not quite. In Visual FoxPro, at least in some versions, the
> >
> >I'm sorry, Visual FoxPro?
>
> A mid-level DBMS developed by Microsoft.
I know what it is. I was questioning the relevance to a discussion of Java idioms.
> >> releasing of an object or an array with object references would result
> >> in a memory leak. Setting to null was a workaround for that. I would
> >> not be surprised if it happened in some other languages, too. However,
> >> I would not do it unless it were required.
> >
> >I'm not so sure that rules of thumb derived from Visual FoxPro are
> >applicable here.
>
> I was countering your superstition statement.
Superstition is bad engineering and should be countered.
> >The urban legends to which I referred are specifically about Java.
>
> All you mentioned was that they were notable. You did not
The context was a discussion of Java.
> mention Java. We do not discuss only Java here. And some cargo cult
This particular discussion was only about Java. The OP was asking about
removing JFrame instances from memory. That is not a general programming
question.
My point about 'null' was specific to Java because the topic was.
Don't be disingenuous.
> programming can leap from language to language.
The reasons for or against setting to null are not the same, as
VFP is not a memory-managed language.
> I have seen the set-to-null requirement stated for VFP (with a
> reason) and VB 6 (without a reason). Now, you say it is in Java, too,
> with limited times when it is necessary.
Different languages, different reasons, different worlds.
The point about avoiding superstition does cross universes.
--
Lew
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Closing/Despose of JFrame Jesper Johnsen <jsjohnsen.dk@gmail.com> - 2012-06-28 06:38 -0700
Re: Closing/Despose of JFrame markspace <-@.> - 2012-06-28 07:22 -0700
Re: Closing/Despose of JFrame Lew <lewbloch@gmail.com> - 2012-06-28 09:47 -0700
Re: Closing/Despose of JFrame Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-06-28 23:31 +0000
Re: Closing/Despose of JFrame Lew <lewbloch@gmail.com> - 2012-06-28 17:42 -0700
Re: Closing/Despose of JFrame Gene Wirchenko <genew@ocis.net> - 2012-06-28 19:55 -0700
Re: Closing/Despose of JFrame Lew <lewbloch@gmail.com> - 2012-06-29 10:19 -0700
Re: Closing/Despose of JFrame Gene Wirchenko <genew@ocis.net> - 2012-06-29 13:24 -0700
Re: Closing/Despose of JFrame Lew <lewbloch@gmail.com> - 2012-06-29 13:36 -0700
Re: Closing/Despose of JFrame Roedy Green <see_website@mindprod.com.invalid> - 2012-06-29 05:31 -0700
Re: Closing/Despose of JFrame Lew <lewbloch@gmail.com> - 2012-06-28 12:46 -0700
Re: Closing/Despose of JFrame "John B. Matthews" <nospam@nospam.invalid> - 2012-06-28 22:32 -0400
csiph-web