Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

global variables  RSS feed

 
sachin komurlekar
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
does much of global variables effect the performance.
 
balaji iyer
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it does... because the garbage collector will have to wait for collection of those variables until ur class/Objects is still in use, so always avoid using global variables unless your are maintaining some very small resource like EJB Home or Remote Interface.
Method variables will always die when out of scope.

Hope this helps.
------------------
Balaji Iyer,
System Architect,
Net4nuts.com
Ahmedabad
"If you want to make God Laugh, Tell HIM your plans !! "
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!