diff --git a/Import/GacUICompiler.cpp b/Import/GacUICompiler.cpp index 8828f391..027da5e4 100644 --- a/Import/GacUICompiler.cpp +++ b/Import/GacUICompiler.cpp @@ -184,6 +184,10 @@ GuiInstancePropertyInfo IGuiInstanceLoader ***********************************************************************/ + void IGuiInstanceLoader::ClearReflectionCache() + { + } + void IGuiInstanceLoader::GetPropertyNames(const TypeInfo& typeInfo, collections::List& propertyNames) { } @@ -367,6 +371,13 @@ GuiDefaultInstanceLoader return GlobalStringKey::Empty; } + void ClearReflectionCache() + { + propertyTypes.Clear(); + defaultConstructors.Clear(); + instanceConstructors.Clear(); + } + //*********************************************************************************** void ProcessGenericType(ITypeInfo* propType, ITypeInfo*& genericType, ITypeInfo*& elementType, bool& readableList, bool& writableList, bool& collectionType) @@ -1033,6 +1044,15 @@ GuiInstanceLoaderManager } return GlobalStringKey::Empty; } + + void ClearReflectionCache() + { + rootLoader->ClearReflectionCache(); + FOREACH(Ptr, info, typeInfos.Values()) + { + info->loader->ClearReflectionCache(); + } + } }; GUI_REGISTER_PLUGIN(GuiInstanceLoaderManager) } @@ -1643,6 +1663,7 @@ Instance Type Resolver (Instance) { Workflow_GenerateAssembly(compiled, path, errors); } + GetInstanceLoaderManager()->ClearReflectionCache(); } #undef DELETE_ASSEMBLY diff --git a/Import/GacUICompiler.h b/Import/GacUICompiler.h index 603f6618..5ca02224 100644 --- a/Import/GacUICompiler.h +++ b/Import/GacUICompiler.h @@ -521,6 +521,7 @@ Instance Loader typedef collections::Group ArgumentMap; virtual GlobalStringKey GetTypeName() = 0; + virtual void ClearReflectionCache(); virtual void GetPropertyNames(const TypeInfo& typeInfo, collections::List& propertyNames); virtual void GetConstructorParameters(const TypeInfo& typeInfo, collections::List& propertyNames); @@ -573,6 +574,7 @@ Instance Loader Manager virtual description::ITypeDescriptor* GetTypeDescriptorForType(GlobalStringKey typeName) = 0; virtual void GetVirtualTypes(collections::List& typeNames) = 0; virtual GlobalStringKey GetParentTypeForVirtualType(GlobalStringKey virtualType) = 0; + virtual void ClearReflectionCache() = 0; }; extern IGuiInstanceLoaderManager* GetInstanceLoaderManager(); diff --git a/Tutorial/GacUI_ControlTemplate/UIRes/BlackSkin.bin b/Tutorial/GacUI_ControlTemplate/UIRes/BlackSkin.bin index 47fe81e8..6998e724 100644 Binary files a/Tutorial/GacUI_ControlTemplate/UIRes/BlackSkin.bin and b/Tutorial/GacUI_ControlTemplate/UIRes/BlackSkin.bin differ diff --git a/Tutorial/GacUI_Controls/UIRes/ContainersAndButtons.bin b/Tutorial/GacUI_Controls/UIRes/ContainersAndButtons.bin index 889a8bc3..6a090830 100644 Binary files a/Tutorial/GacUI_Controls/UIRes/ContainersAndButtons.bin and b/Tutorial/GacUI_Controls/UIRes/ContainersAndButtons.bin differ diff --git a/Tutorial/GacUI_Controls/UIRes/TextEditor.bin b/Tutorial/GacUI_Controls/UIRes/TextEditor.bin index 7acd74e2..c82828e1 100644 Binary files a/Tutorial/GacUI_Controls/UIRes/TextEditor.bin and b/Tutorial/GacUI_Controls/UIRes/TextEditor.bin differ diff --git a/Tutorial/GacUI_HelloWorlds/UIRes/CppXml.bin b/Tutorial/GacUI_HelloWorlds/UIRes/CppXml.bin index be29b9ff..72a0f3be 100644 Binary files a/Tutorial/GacUI_HelloWorlds/UIRes/CppXml.bin and b/Tutorial/GacUI_HelloWorlds/UIRes/CppXml.bin differ diff --git a/Tutorial/GacUI_HelloWorlds/UIRes/MVVM.bin b/Tutorial/GacUI_HelloWorlds/UIRes/MVVM.bin index 195ff751..e81917d4 100644 Binary files a/Tutorial/GacUI_HelloWorlds/UIRes/MVVM.bin and b/Tutorial/GacUI_HelloWorlds/UIRes/MVVM.bin differ diff --git a/Tutorial/GacUI_Layout/UIRes/Alignment.bin b/Tutorial/GacUI_Layout/UIRes/Alignment.bin index 016b9410..0ee07cd9 100644 Binary files a/Tutorial/GacUI_Layout/UIRes/Alignment.bin and b/Tutorial/GacUI_Layout/UIRes/Alignment.bin differ diff --git a/Tutorial/GacUI_Layout/UIRes/Flow.bin b/Tutorial/GacUI_Layout/UIRes/Flow.bin index d94dee15..23c2b34d 100644 Binary files a/Tutorial/GacUI_Layout/UIRes/Flow.bin and b/Tutorial/GacUI_Layout/UIRes/Flow.bin differ diff --git a/Tutorial/GacUI_Layout/UIRes/RichTextEmbedding.bin b/Tutorial/GacUI_Layout/UIRes/RichTextEmbedding.bin index 468ec5ff..2b537548 100644 Binary files a/Tutorial/GacUI_Layout/UIRes/RichTextEmbedding.bin and b/Tutorial/GacUI_Layout/UIRes/RichTextEmbedding.bin differ diff --git a/Tutorial/GacUI_Layout/UIRes/Stack.bin b/Tutorial/GacUI_Layout/UIRes/Stack.bin index 4af2d874..d3027026 100644 Binary files a/Tutorial/GacUI_Layout/UIRes/Stack.bin and b/Tutorial/GacUI_Layout/UIRes/Stack.bin differ diff --git a/Tutorial/GacUI_Layout/UIRes/Table.bin b/Tutorial/GacUI_Layout/UIRes/Table.bin index cf9d6773..9cd6f0b4 100644 Binary files a/Tutorial/GacUI_Layout/UIRes/Table.bin and b/Tutorial/GacUI_Layout/UIRes/Table.bin differ