Is copying (audio)data from the MediaStore database (like path, title, artist etc.) to classes a good practice or should it be handled directly from the database? Is it necessary to create an instance of class "Song" for each song in the database? My main concern is that for huge audio collections it could end up with quite a lot of memory being used.

有帮助吗?

解决方案

Depending on what you are doing with the data it is probably fine to create instances of a Song class. Presumably you are just saving some strings/ints to each class so memory shouldn't be a big problem.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top