The Artima Developer Community
Sponsored Link

Java Answers Forum
not assigning a reference bad coding standard

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ajit Koti

Posts: 1
Nickname: ajitkoti
Registered: Jan, 2009

not assigning a reference bad coding standard Posted: Jan 8, 2009 10:20 AM
Reply to this message Reply
Advertisement
Hi,

I am creating a JMS Subscriber class

In Controller.java

public class Controller{
 
public Controller(){
  new Subscriber();
}
 
}


I wanted to know if I dont assign a reference to the Subcriber object
i.e Subcriber s =new Subcriber ();

will the Subcriber be garabage collected if its not assigned a reference.

Is it a bad coding standard

Topic: Can anyone help explain/comment on this code ? Previous Topic   Next Topic Topic: Java Hot spots Atlantic Canada/Ontario

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use