I'm writing a simple app to scan MP3 files, thousands of them. I've located an opensource class called Mp3Class which makes extracting the elements from an MP3 file easy, but I don't have much experience with objects. The following snippit works correctly on my small sample of files, but I'm concerned that calling New 30,000 times will not be memory efficient. Would it add value to put "currentMp3 = Nothing" after my logDetail line? I just don't know how to rewrite this so that I can re-use a single Mp3Class object in the loop (by taking the New out of the loop). Suggestions welcome.
CODE --> vb.net
For Each file In directory.GetFiles("*.MP3")
currentMp3 = New Mp3Class(file.FullName)
Red Flag Submitted
Thank you for helping keep Tek-Tips Forums free from inappropriate posts. The Tek-Tips staff will check this out and take appropriate action.
Reply To This Thread
Posting in the Tek-Tips forums is a member-only feature.