• Post Reply Bookmark Topic Watch Topic
  • New Topic

Should I must program for closing data file?

 
long lingyu
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MustI program for closing data file? I don't code for closing file.
 
Jacques Bosch
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think it is probably better if you do.
All I did was to close my raf on my data class' finalize() method. But that wasn't the best way to do it, as it was probably never called by the GC. Never the less, I didn't lose any marks for that.
But close it upon your server's or standalone modes' exit. I think that is best.
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!