The best answer I found on SO was this:
https://stackoverflow.com/a/36123026/2941313
If you follow the link to the msdn page about XmlSerializer, you can still see this comment:
To increase performance, the XML serialization infrastructure dynamically generates assemblies to serialize and deserialize specified types. The infrastructure finds and reuses those assemblies. This behavior occurs only when using the following constructors:
- XmlSerializer.XmlSerializer(Type)
- XmlSerializer.XmlSerializer(Type, String)
If you use any of the other constructors, multiple versions of the same assembly are generated and never unloaded, which results in a memory leak and poor performance. The easiest solution is to use one of the previously mentioned two constructors. Otherwise, you must cache the assemblies in a Hashtable, as shown in the following example.
And there are examples of proper hasing... So I guess, the answer is yes, but you can work around those memory issues.