Home > Mobile >  Novice whim, whether can use the singleton pattern in activity between objects?
Novice whim, whether can use the singleton pattern in activity between objects?

Time:11-28

As title, if a particular object to save some of the global information, under the condition of each activity need to modify, whether this class can be set as singleton to serialization can pass between the activity? Good, if you can do this? The great god answer, thank you!

CodePudding user response:

Can, of course, some of the signs is saved by single example, what big data (more than the intent of the size range) can also use the singleton, harm is the interface between the correlation is not strong, the code is not very good maintenance and reading,
  • Related