- Home
- LLBLGen Pro
- LLBLGen Pro Runtime Framework
Dynamic Controls With Entity Objects - General Question
So I have a desktop application. VB.Net (because the client wouldn't let me do it in C#).
The application presents dynamic (.Net User Control) controls on a form. Each control represents a survey question. The control may be in the form of a textbox, combobox, series of check boxes etc. The control is added to a .Net Panel object on the form.
I have a QuestionEntity object that I store in each control along with a QuestionResponseEntity. There may be any number of questions (controls) on the form at any given time. As the user select different subject, my application removes the controls (quesitons) from the Panel.
My question to you is; what happens to my QuestionEntity and QuestionResponseEntity objects?
Thanks, James
Joined: 03-Nov-2007
If the user selects a different survey, and your UserControl closes...
As long as your QuestionEntity & QuestionResponseEntity are referenced by another entity still in scope (ie, SurveyCollection), your entities will happily remain in-memory.
I am doing this successfully myself, wherein each Entity is represented by a UserControl.
Hope this helps -
Ryan
Thanks Ryan, IN this case, what I'm hoping is that the Question* objects are getting distroyed. I'm experiencing some memory run-up over time with this application and I'm just trying to rule in or out my LLBLGen objects.
My application is actually a plug-in to Windows-based COM-based application. That said it could very well be a problem with the "host" application.
Thanks again, James
Joined: 03-Nov-2007
Ahh, good question. I have not worked specifically with reclaiming LLBLGen memory, so I will give you the simple answer & let Frans & company assist you further.
You could simply do myCollection.Remove(myQuestionEntity). However, make sure you are not using a .RemovedEntitiesTracker within that collection.
Another method you could look at is trying to Force garbage collection. When doing this, you can check to see if your entity is being referenced by any other objects.
Good luck! Please let us know how you do.
Ryan
Thanks again Ryan, I'm curious about how I might go about determining if my Entity is being referenced by any other objects. I'm about 4 months into LLBGen so there's a ton I haven't figured out yet.
I actually use the .Tag of one of the child controls to house the actual entity. In my code, that instantiates the User Controls, is where I attempt to kill the Collections (Collection = Nothing). After the loop that creates the controls I issue GC.Collect. I'm also doing GC.Collect in my method that clears the questions from the form.
Like I said, I'm not convinced there's anything a miss with my LLBLGen but want to make sure I'm doing all I can to mitigate the memory leak problem I'm seeing in the host application.
Joined: 03-Nov-2007
From an LLBLGen side, This should give you an idea of what other Entities are connected to your current Entity.
Public Shared Function GetEntitiesInGraph(ByRef argEntity As IEntity) As List(Of IEntity)
Dim GraphUtil As New ObjectGraphUtils()
Return GraphUtil.ProduceTopologyOrderedList(argEntity)
End Function
Hope this helps!
Ryan
New Information: Well this has turned into quite an adventure for sure. Here's what I've discovered since I stated this thread:
Microsoft's claims that .Net does such a great job of cleaning up after it self is horse s**t. F.Y.I.: If you create dynamic controls in .Net and add them to (say) a Panel (Panel1) you would think it would be enough to simply say "Panel1.Controls.Clear()". If you look at the form the controls are gone alright. However if you take a look in Windows Debugger you'll see the controls are most definitely not removed from memory.
Here's my test: <Edited> LLBLGen 2.6 SD.LLBLGen.Pro.DQE.Access.NET20.dll (v2.6.8.819) SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll (v2.6.8.1013) .Net 2.0 SelfServicing Visual Studio 2008 </Edited> I created a simple little VB.Net project that loads a Panel with 1000 instances of a User Control. The UC has a Checkbox and a couple Label objects. ** Just to make things interesting I created a LLBLGen Entity object and store it in the UC.Tag value**.
I have 3 buttons on the form. Button1 loads up the Panel with the 1000 UC's. Button 2 cleans them out and performs a GC.Collect. Button 3 just does another GC.Collect.
Here's my source code:
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myTop As Long
Dim cb As Q_OS_TYPE_3_CHECKBOX = Nothing
For j As Integer = 0 To 1000
cb = New Q_OS_TYPE_3_CHECKBOX
cb.Name = "chkbx" & j
cb.Top = myTop
cb.Tag = New GMA_DATA.EntityClasses.FcBorrowPitsEntity
Panel1.Controls.Add(cb)
myTop = myTop + cb.Height
Next
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Do Until Panel1.Controls.Count = 0
For Each ctrl As Control In Panel1.Controls
Panel1.Controls.Remove(ctrl)
Dim _Entity As GMA_DATA.EntityClasses.FcBorrowPitsEntity = ctrl.Tag
ctrl.Tag = Nothing
_Entity = Nothing
ctrl.Dispose()
ctrl = Nothing
Next
Loop
Me.PerformLayout()
GC.Collect()
GC.WaitForPendingFinalizers()
GC.Collect()
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
GC.Collect()
End Sub
End Class
Load it up and watch the memory run up. No big surprise there eh? Well, clear it out and the memory level stays. What's more interesting is what WinDbg has to say. Check this out...notice in the following Dumpheap -stat all the LBLGen style objects still hanging around. This is after (Button 2 click) I clear out all the controls from the Panel and Entity objects from the Control.Tag:
7b22c554 1 12 System.Windows.Forms.VisualStyles.VisualStyleRenderer+ThemeHandle
7b227e90 1 12 System.Windows.Forms.OSFeature
7b225338 1 12 System.Windows.Forms.FormCollection
7b2247a0 1 12 System.Windows.Forms.Layout.ArrangedElementCollection
7b2246e8 1 12 System.Windows.Forms.Layout.DefaultLayout
799520a8 1 12 System.Collections.Generic.Dictionary`2+KeyCollection[[System.String, mscorlib],[System.Object, mscorlib]]
79335500 1 12 System.Collections.Generic.ObjectEqualityComparer`1[[System.Runtime.Serialization.MemberHolder, mscorlib]]
79333ed4 1 12 System.Text.DecoderExceptionFallback
79333e90 1 12 System.Text.EncoderExceptionFallback
793332c8 1 12 System.IntPtr
79331ea4 1 12 System.RuntimeTypeHandle
7932fb28 1 12 System.__Filters
7932fad8 1 12 System.Reflection.Missing
7932f9e0 1 12 System.RuntimeType+TypeCacheQueue
7932a9cc 1 12 System.Collections.Hashtable+ValueCollection
7932a514 1 12 System.EventArgs
79329ce4 1 12 System.Threading.SynchronizationContext
793299dc 1 12 System.Collections.Generic.ObjectEqualityComparer`1[[System.Object, mscorlib]]
79329610 1 12 System.Collections.Generic.ObjectEqualityComparer`1[[System.IntPtr, mscorlib]]
79329370 1 12 System.Collections.Generic.GenericEqualityComparer`1[[System.Int16, mscorlib]]
79327a7c 1 12 System.Collections.Generic.GenericEqualityComparer`1[[System.String, mscorlib]]
79326d1c 1 12 System.Collections.Generic.ObjectEqualityComparer`1[[System.Type, mscorlib]]
79324c44 1 12 System.Collections.Generic.GenericArraySortHelper`1[[System.Int32, mscorlib]]
79322010 1 12 System.Runtime.Remoting.Lifetime.LeaseLifeTimeServiceProperty
793217e4 1 12 System.Runtime.Remoting.Activation.ActivationListener
79321730 1 12 System.Runtime.Remoting.Activation.LocalActivator
793212e8 1 12 System.Runtime.Remoting.Proxies.ProxyAttribute
793173a0 1 12 System.Runtime.Remoting.Messaging.CallContextSecurityData
7930f71c 1 12 System.Collections.Generic.GenericEqualityComparer`1[[System.Guid, mscorlib]]
793093c8 1 12 System.Reflection.__Filters
79307f1c 1 12 System.DBNull
79307ecc 1 12 System.Empty
793075f0 1 12 System.Collections.Generic.GenericComparer`1[[System.Int32, mscorlib]]
793044cc 1 12 System.Boolean
79304280 1 12 System.DefaultBinder
648c93a0 1 12 System.Configuration.ConfigurationPermission
648c9344 1 12 System.Configuration.ConfigurationValues+EmptyCollection+EmptyCollectionEnumerator
648c92f4 1 12 System.Configuration.ConfigurationValues+EmptyCollection
648c91a8 1 12 System.Configuration.ConfigurationElementProperty
648c8a54 1 12 System.Configuration.SimpleBitVector32
648c88b8 1 12 System.Configuration.BaseConfigurationRecord+IndirectLocationInputComparer
648c862c 1 12 System.Configuration.Internal.InternalConfigHost
0124b894 1 12 GMA_DATA.HelperClasses.PersistenceInfoProviderCore
0124b038 1 12 System.Collections.Generic.Dictionary`2+KeyCollection[[System.String, mscorlib],[SD.LLBLGen.Pro.ORMSupportClasses.InheritanceInfoProviderBase+EntityInfo, SD.LLBLGen.Pro.ORMSupportClasses.NET20]]
0124af7c 1 12 System.Collections.Generic.Dictionary`2+KeyCollection[[System.String, mscorlib],[SD.LLBLGen.Pro.ORMSupportClasses.FieldInfoProviderBase+ElementFields, SD.LLBLGen.Pro.ORMSupportClasses.NET20]]
01249af4 1 12 GMA_DATA.HelperClasses.FieldInfoProviderCore
012491c0 1 12 GMA_DATA.RelationClasses.GmaTriggeredQuestionsRelations
0124902c 1 12 GMA_DATA.RelationClasses.GmaRespTextRelations
01248dec 1 12 GMA_DATA.RelationClasses.GmaRespMultiChoiceRelations
01248c64 1 12 GMA_DATA.RelationClasses.GmaRespFeatureRelatesRelations
01248ba0 1 12 GMA_DATA.RelationClasses.GmaResponsesRelations
01248878 1 12 GMA_DATA.RelationClasses.GmaPreSiteLvl2TabsRelations
012486f0 1 12 GMA_DATA.RelationClasses.GmaPreSiteLvl1TabsRelations
01248568 1 12 GMA_DATA.RelationClasses.GmaOnSiteLocationsRelations
012484a4 1 12 GMA_DATA.RelationClasses.GmaQLocationsRelations
012482f0 1 12 GMA_DATA.RelationClasses.GmaMainQuestionsRelations
0124820c 1 12 GMA_DATA.RelationClasses.GmaQuestionsRelations
01248050 1 12 GMA_DATA.RelationClasses.GmaDnrNonMapFeaturesRelations
01247e48 1 12 GMA_DATA.RelationClasses.GmaDnrMappableFeaturesRelations
012477f8 1 12 GMA_DATA.RelationClasses.GmaDnrFeaturesRelations
00946424 1 12 MultiCheckbox.My.MyProject+ThreadSafeObjectProvider`1[[MultiCheckbox.My.MyProject+MyWebServices, MultiCheckbox]]
00946314 1 12 MultiCheckbox.My.MyProject+ThreadSafeObjectProvider`1[[MultiCheckbox.My.MyProject+MyForms, MultiCheckbox]]
009462c4 1 12 MultiCheckbox.My.MyProject+MyForms
009461c4 1 12 MultiCheckbox.My.MyProject+ThreadSafeObjectProvider`1[[Microsoft.VisualBasic.ApplicationServices.User, Microsoft.VisualBasic]]
00946164 1 12 MultiCheckbox.My.MyProject+ThreadSafeObjectProvider`1[[MultiCheckbox.My.MyApplication, MultiCheckbox]]
00946044 1 12 MultiCheckbox.My.MyProject+ThreadSafeObjectProvider`1[[MultiCheckbox.My.MyComputer, MultiCheckbox]]
7b2255e0 1 16 System.Windows.Forms.Application+ComponentManager+ComponentHashtableEntry
7b2252c8 1 16 System.Windows.Forms.Control+FontHandleWrapper
7b223bdc 1 16 System.Windows.Forms.ClientUtils+WeakRefCollection
7ae3c3ac 1 16 System.Drawing.PointF
7ae3bd7c 1 16 System.Drawing.Point
7ae3bd1c 1 16 System.Drawing.SizeF
7a5e7e3c 1 16 System.Collections.Specialized.NameObjectCollectionBase+NameObjectEntry
79955630 1 16 System.Collections.ObjectModel.ReadOnlyCollection`1[[System.String, mscorlib]]
79333bf8 1 16 System.Text.DecoderReplacementFallback
79333ba8 1 16 System.Text.EncoderReplacementFallback
793320a4 1 16 System.Globalization.GlobalizationAssembly
79306e3c 1 16 System.Enum+HashEntry
648c8500 1 16 System.Configuration.Internal.ConfigSystem
01249270 1 16 GMA_DATA.FactoryClasses.GmaTriggeredQuestionsEntityFactory
012490d0 1 16 GMA_DATA.FactoryClasses.GmaRespTextEntityFactory
01248f54 1 16 GMA_DATA.FactoryClasses.GmaResponsesEntityFactory
01248e94 1 16 GMA_DATA.FactoryClasses.GmaRespMultiChoiceEntityFactory
01248d0c 1 16 GMA_DATA.FactoryClasses.GmaRespFeatureRelatesEntityFactory
01248aa0 1 16 GMA_DATA.FactoryClasses.GmaQuestionsEntityFactory
012489e0 1 16 GMA_DATA.FactoryClasses.GmaQLocationsEntityFactory
01248920 1 16 GMA_DATA.FactoryClasses.GmaPreSiteLvl2TabsEntityFactory
01248798 1 16 GMA_DATA.FactoryClasses.GmaPreSiteLvl1TabsEntityFactory
01248610 1 16 GMA_DATA.FactoryClasses.GmaOnSiteLocationsEntityFactory
012483a4 1 16 GMA_DATA.FactoryClasses.GmaMainQuestionsEntityFactory
01248108 1 16 GMA_DATA.FactoryClasses.GmaDnrNonMapFeaturesEntityFactory
01247f50 1 16 GMA_DATA.FactoryClasses.GmaDnrMappableFeaturesEntityFactory
01247ca8 1 16 GMA_DATA.FactoryClasses.GmaDnrFeaturesEntityFactory
7b22f334 1 20 System.Windows.Forms.Control+ControlCollection+ControlCollectionEnumerator
7b223d54 1 20 System.Windows.Forms.Internal.MeasurementDCInfo+CachedInfo
7b221670 1 20 System.Windows.Forms.WindowsFormsSynchronizationContext
7a5d2608 1 20 Microsoft.Win32.SystemEvents
7932f930 1 20 System.Reflection.CerHashtable`2[[System.String, mscorlib],[System.Reflection.CerArrayList`1[[System.Reflection.RuntimeMethodInfo, mscorlib]], mscorlib]]
7932a0fc 1 20 System.Object[][]
79328fbc 1 20 System.Random
79323470 1 20 System.Security.Cryptography.SafeProvHandle
79321e74 1 20 System.Runtime.Remoting.Contexts.DynamicPropertyHolder
793180c0 1 20 Microsoft.Win32.SafeHandles.SafeTokenHandle
648c9434 1 20 System.Configuration.ConfigurationValue
648c9118 1 20 System.Configuration.StringValidator
03e2505c 1 20 SD.LLBLGen.Pro.ORMSupportClasses.DependencyInjectionInfoProvider
7b225530 1 24 System.Windows.Forms.NativeMethods+MSOCRINFOSTRUCT
7b224940 1 24 System.Windows.Forms.Form+ControlCollection
7b22348c 1 24 System.Collections.Generic.List`1[[System.Collections.Generic.KeyValuePair`2[[System.Drawing.Font, System.Drawing],[System.Windows.Forms.Internal.WindowsFont, System.Windows.Forms]], mscorlib]]
793351b0 1 24 System.Runtime.Serialization.MemberHolder
79332624 1 24 System.OperatingSystem
7932e91c 2 24 System.RuntimeTypeHandle[]
79321f08 1 24 System.Runtime.Remoting.RemotingConfigHandler+RemotingConfigInfo
7931e470 1 24 System.Runtime.Serialization.SerializationEvents
7930ed98 1 24 System.Security.Principal.WindowsPrincipal
7930961c 1 24 System.LocalDataStoreMgr
79306be4 2 24 System.OrdinalComparer
793051a0 1 24 System.RuntimeType+ActivatorCache
648c9158 2 24 System.Configuration.DefaultValidator
648c8bec 2 24 System.Configuration.OverrideModeSetting
5e572e3c 1 24 Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase+WinFormsAppContext
03e251a0 1 24 System.Collections.Generic.Stack`1[[SD.LLBLGen.Pro.ORMSupportClasses.DependencyInjectionInfoStorage, SD.LLBLGen.Pro.ORMSupportClasses.NET20]]
03e2514c 1 24 SD.LLBLGen.Pro.ORMSupportClasses.DependencyInjectionInfoStorage
7b22614c 1 28 System.Windows.Forms.Cursor
7b2260cc 1 28 System.Windows.Forms.MouseEventArgs
7b2254a0 1 28 System.Windows.Forms.Application+ComponentManager
793310cc 1 28 System.SharedStatics
7932f8c4 1 28 System.RuntimeType+RuntimeTypeCache+MemberInfoCache`1[[System.Reflection.RuntimeMethodInfo, mscorlib]]
79321f9c 1 28 System.Runtime.Remoting.Channels.ChannelServicesData
648c8074 1 28 System.Configuration.ClientConfigurationHost
7a5d246c 1 32 Microsoft.Win32.NativeMethods+WndProc
7a5d22e4 1 32 Microsoft.Win32.NativeMethods+ConHndlr
79333f2c 1 32 System.Threading.IOCompletionCallback
79333010 1 32 System.Security.PermissionTokenFactory
7932f870 2 32 System.Reflection.CerArrayList`1[[System.Reflection.RuntimeConstructorInfo, mscorlib]]
7932a948 1 32 System.Threading.ContextCallback
7932a758 1 32 System.Globalization.CompareInfo
79308060 2 32 System.DateTime
79306b70 2 32 System.CultureAwareComparer
648c8edc 2 32 System.Configuration.RuntimeConfigurationRecord+RuntimeConfigurationFactory
648c8568 1 32 System.Configuration.Internal.InternalConfigRoot
648c829c 1 32 System.Configuration.Internal.InternalConfigEventHandler
01247174 1 32 GMA_DATA.HelperClasses.InheritanceInfoProviderCore
7b227df8 1 36 System.Windows.Forms.UnsafeNativeMethods+ThemingScope+ACTCTX
7b221394 1 36 System.Windows.Forms.AnchorStyles[]
7b21a758 3 36 System.Windows.Forms.ButtonInternal.ButtonStandardAdapter
793321dc 1 36 System.Int64[]
7932d6f4 1 36 System.Threading.ExecutionContext
7932901c 1 36 System.Security.Principal.WindowsIdentity
79317d60 1 36 System.Runtime.Remoting.Messaging.LogicalCallContext
648c9008 3 36 System.Configuration.ConfigurationPropertyCollection
648c8004 1 36 System.Configuration.ClientConfigurationSystem
7b22c518 2 40 System.Windows.Forms.VisualStyles.VisualStyleElement
7b2259ec 1 40 System.Windows.Forms.NativeMethods+MSG[]
7a5eccdc 1 40 System.Diagnostics.BooleanSwitch
79321f54 1 40 System.Runtime.Remoting.DomainSpecificRemotingData
793314ec 1 44 System.AppDomainSetup
7b22c46c 2 48 System.Windows.Forms.VisualStyles.VisualStyleRenderer
7b225248 2 48 System.Windows.Forms.InvalidateEventArgs
7ae3b358 4 48 System.Drawing.Printing.PrintingPermission
7ae3b264 2 48 System.Drawing.Rectangle
7a5d2764 2 48 System.Collections.Generic.List`1[[Microsoft.Win32.SystemEvents+SystemEventInvokeInfo, System]]
7a5d23a4 1 48 Microsoft.Win32.NativeMethods+WNDCLASS
793317b0 1 48 System.Globalization.TextInfo
7932f98c 3 48 System.Reflection.CerArrayList`1[[System.Reflection.RuntimeMethodInfo, mscorlib]]
7932c910 2 48 System.Guid
79307fc4 3 48 System.TimeSpan
793051e8 2 48 System.RuntimeType+ActivatorCacheEntry
648c8198 1 48 System.Configuration.ClientConfigPaths
7a5d2654 1 52 System.Collections.Generic.Dictionary`2[[System.Object, mscorlib],[System.Collections.Generic.List`1[[Microsoft.Win32.SystemEvents+SystemEventInvokeInfo, System]], mscorlib]]
793351f4 1 52 System.Collections.Generic.Dictionary`2[[System.Runtime.Serialization.MemberHolder, mscorlib],[System.Reflection.MemberInfo[], mscorlib]]
793293f4 1 52 System.Collections.Generic.Dictionary`2[[System.IntPtr, mscorlib],[System.Int16, mscorlib]]
79329154 1 52 System.Collections.Generic.Dictionary`2[[System.Int16, mscorlib],[System.IntPtr, mscorlib]]
793158c4 1 52 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.Object, mscorlib]]
7930c8ec 1 52 System.Collections.Generic.Dictionary`2[[System.Type, mscorlib],[System.Object, mscorlib]]
03e28ed4 1 52 SD.LLBLGen.Pro.ORMSupportClasses.MultiValueHashtable`2[[System.Type, mscorlib],[SD.LLBLGen.Pro.ORMSupportClasses.InjectionInfo, SD.LLBLGen.Pro.ORMSupportClasses.NET20]]
0124ba00 1 52 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[SD.LLBLGen.Pro.ORMSupportClasses.PersistenceInfoProviderBase+ElementToTargetMapping, SD.LLBLGen.Pro.ORMSupportClasses.NET20]]
01249c8c 1 52 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[SD.LLBLGen.Pro.ORMSupportClasses.FieldInfoProviderBase+ElementFields, SD.LLBLGen.Pro.ORMSupportClasses.NET20]]
0124740c 1 52 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[SD.LLBLGen.Pro.ORMSupportClasses.InheritanceInfoProviderBase+EntityInfo, SD.LLBLGen.Pro.ORMSupportClasses.NET20]]
0096271c 1 52 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.String, mscorlib]], mscorlib]]
7b225e94 1 56 System.Windows.Forms.TextImageRelation[]
79333aa4 2 56 System.Text.UTF8Encoding
79330fd4 1 56 System.Threading.Thread
7932f7a8 2 56 System.RuntimeType+RuntimeTypeCache+MemberInfoCache`1[[System.Reflection.RuntimeConstructorInfo, mscorlib]]
7932cf6c 1 56 System.LogLevel[]
648c7be4 1 56 System.Configuration.KeyValueInternalCollection
7ae3b7c4 3 60 System.Drawing.FontFamily
7a5d28f0 1 60 System.Collections.Generic.Dictionary`2+Entry[[System.Object, mscorlib],[System.Collections.Generic.List`1[[Microsoft.Win32.SystemEvents+SystemEventInvokeInfo, System]], mscorlib]][]
793338bc 3 60 System.Globalization.CultureTableItem
79321de4 1 60 System.Runtime.Remoting.Contexts.Context
7b9b0334 1 64 System.Windows.Forms.WindowsFormsSection
7b2246b0 4 64 System.Windows.Forms.LayoutEventArgs
7b2232bc 2 64 System.Windows.Forms.PropertyStore+IntegerEntry[]
7a5d2858 4 64 Microsoft.Win32.SystemEvents+SystemEventInvokeInfo
7a5d2584 2 64 Microsoft.Win32.UserPreferenceChangingEventHandler
7a5d24f8 2 64 Microsoft.Win32.UserPreferenceChangedEventHandler
7932a6d4 2 64 System.Runtime.CompilerServices.RuntimeHelpers+CleanupCode
7932a648 2 64 System.Runtime.CompilerServices.RuntimeHelpers+TryCode
79309420 2 64 System.Reflection.TypeFilter
79306f74 4 64 System.__ComObject
7ae3c434 1 68 System.Drawing.BufferedGraphicsContext
79333828 1 68 System.Globalization.CultureTable
648c7988 1 68 System.Configuration.AppSettingsSection
7b226a30 3 72 System.Windows.Forms.NativeMethods+TRACKMOUSEEVENT
7b220dfc 3 72 System.Windows.Forms.ImageList+Indexer
79332c4c 6 72 System.Int32
79330d44 1 72 System.ExecutionEngineException
79330cb4 1 72 System.StackOverflowException
79330c24 1 72 System.OutOfMemoryException
79328ee4 2 72 System.Collections.Queue
7b224a34 4 80 System.Windows.Forms.Control+ControlCollection
7ae3bdf0 2 80 System.Drawing.Icon
7a5ecac4 4 80 System.Collections.Specialized.HybridDictionary
7a5e7b60 2 80 System.Diagnostics.TraceSwitch
79332f64 4 80 System.Security.PermissionToken
7932ae30 5 80 System.Security.Permissions.UIPermission
7b221318 3 84 System.Windows.Forms.Padding
638579d0 1 84 System.Xml.XmlTextReaderImpl+NodeData
7b987850 2 88 System.Windows.Forms.Control+ControlAccessibleObject
7b2221c0 2 88 System.Windows.Forms.NativeWindow+WindowClass
793328a0 2 88 System.Security.FrameSecurityDescriptor
7b2236fc 1 92 System.Collections.Generic.KeyValuePair`2[[System.Drawing.Font, System.Drawing],[System.Windows.Forms.Internal.WindowsFont, System.Windows.Forms]][]
7ae3ce88 4 96 System.Drawing.Color
7932fb84 3 96 System.Reflection.MemberFilter
7932e8e4 2 96 System.Signature
7932d7e0 2 96 System.Reflection.RuntimeConstructorInfo
648c7a38 1 96 System.Configuration.KeyValueConfigurationCollection
7a5ecd84 5 100 System.ComponentModel.EventHandlerList+ListEntry
793311e0 1 100 System.AppDomain
7932faa0 1 100 System.Reflection.MetadataArgs+SkipAddresses
648c8910 5 100 System.Configuration.ConfigurationSchemaErrors
7b221ab0 1 104 System.Windows.Forms.Application+MarshalingControl
79332fc4 3 108 System.Security.Util.TokenBasedSet
7932ce78 1 108 System.SwitchStructure[]
00943db8 1 108 MultiCheckbox.My.MyApplication
7b2214e4 7 112 System.Windows.Forms.PropertyStore+SizeWrapper
7b220e98 7 112 System.Windows.Forms.PropertyStore
7ae3cddc 7 112 System.Drawing.Size
7a5ecd2c 7 112 System.ComponentModel.EventHandlerList
7932fcbc 2 112 System.Reflection.RuntimeMethodInfo
648c8a98 4 112 System.Configuration.StreamInfo
7b22465c 3 120 System.Windows.Forms.VScrollProperties
7b2245b4 3 120 System.Windows.Forms.HScrollProperties
793328e0 10 120 System.Security.Permissions.SecurityPermission
79329e34 5 120 System.Collections.Generic.List`1[[System.WeakReference, mscorlib]]
79315ad4 1 124 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[System.Object, mscorlib]][]
00962ae8 1 124 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.String, mscorlib]], mscorlib]][]
79329f28 8 128 System.Runtime.InteropServices.HandleRef
7b221728 1 132 System.Windows.Forms.Application+ThreadContext
7ae3b3f4 3 132 System.Drawing.Font
7932a208 3 132 System.Threading.ReaderWriterLock
7932b21c 7 140 Microsoft.Win32.SafeHandles.SafeRegistryHandle
79330dd4 2 144 System.Threading.ThreadAbortException
648c91f4 3 144 System.Configuration.ConfigurationValues
648c8b0c 4 144 System.Configuration.Internal.FileVersion
648c92b0 2 152 System.Configuration.SectionInformation
648c8fc0 3 156 System.Configuration.ConfigurationProperty
00962f14 3 156 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.Collections.Generic.List`1[[System.String, mscorlib]], mscorlib]]
648c8990 5 160 System.Configuration.BaseConfigurationRecord+ConfigRecordStreamInfo
7b225690 4 168 System.Windows.Forms.ImeMode[]
7b22ebd8 1 176 System.Windows.Forms.Panel
793326c4 5 180 System.Security.PermissionSet
793337d8 4 192 System.Globalization.CultureTableRecord
79331f4c 8 192 System.Reflection.Assembly
79306d80 1 196 System.UInt64[]
793335fc 3 204 System.Globalization.CultureInfo
7b230970 1 220 System.Windows.Forms.Application+ParkingWindow
001645e8 14 220 Free
7932b01c 7 224 Microsoft.Win32.RegistryKey
7932f138 3 228 System.RuntimeType+RuntimeTypeCache
79333964 2 256 System.Globalization.NumberFormatInfo
03e27084 5 260 SD.LLBLGen.Pro.ORMSupportClasses.MultiValueHashtable`2[[System.Type, mscorlib],[SD.LLBLGen.Pro.ORMSupportClasses.InjectionConfigInfo, SD.LLBLGen.Pro.ORMSupportClasses.NET20]]
7ae3b6d8 10 280 System.Internal.HandleCollector+HandleType
7a5eca1c 14 280 System.UriParser+BuiltInUriParser
7932211c 1 284 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[System.String, mscorlib]][]
012493d8 1 284 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[SD.LLBLGen.Pro.ORMSupportClasses.InheritanceInfoProviderBase+EntityInfo, SD.LLBLGen.Pro.ORMSupportClasses.NET20]][]
7b2222d0 9 288 System.Windows.Forms.NativeMethods+WndProc
7932f078 6 288 System.Reflection.Module
00946e50 1 340 MultiCheckbox.Form1
648c8794 5 360 System.Configuration.RuntimeConfigurationRecord
7b221628 7 364 System.Windows.Forms.CreateParams
648c8de4 12 384 System.Configuration.SectionInput
7b221a5c 14 392 System.Internal.HandleCollector+HandleType
7b220ef0 7 392 System.Windows.Forms.Control+ControlNativeWindow
79332a30 17 408 System.Collections.ArrayList
7932aa44 12 432 System.Collections.Hashtable+HashtableEnumerator
7932831c 9 468 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.String, mscorlib]]
7b21a9c4 3 504 System.Windows.Forms.Button
7b221528 7 524 System.Windows.Forms.PropertyStore+ObjectEntry[]
7ae3bfd0 46 552 System.Drawing.GraphicsUnit
648c8d9c 14 560 System.Configuration.SectionRecord
7ae3c59c 13 572 System.Drawing.BufferedGraphics
7b2235dc 16 576 System.Windows.Forms.Internal.WindowsFont
79335358 1 604 System.Collections.Generic.Dictionary`2+Entry[[System.Runtime.Serialization.MemberHolder, mscorlib],[System.Reflection.MemberInfo[], mscorlib]][]
7b21a83c 13 624 System.Windows.Forms.ButtonInternal.ButtonBaseAdapter+ColorOptions
7b2237b8 16 640 System.Windows.Forms.Internal.IntNativeMethods+LOGFONT
012473c0 14 672 SD.LLBLGen.Pro.ORMSupportClasses.InheritanceInfoProviderBase+EntityInfo
7a5ecdf4 57 684 System.Collections.Specialized.BitVector32+Section
7b223d90 26 728 System.Windows.Forms.Internal.IntNativeMethods+DRAWTEXTPARAMS
0124b380 61 732 System.Collections.Generic.SortedList`2+ValueList[[System.Int32, mscorlib],[SD.LLBLGen.Pro.ORMSupportClasses.IFieldInfo, SD.LLBLGen.Pro.ORMSupportClasses.NET20]]
79331630 21 744 System.Char[]
648c8d44 12 768 System.Configuration.SectionXmlInfo
7b21ca84 13 780 System.Windows.Forms.Control+PrintPaintEventArgs
7932ca60 13 780 System.Collections.Hashtable+SyncHashtable
7b231070 52 832 System.Windows.Forms.WindowsGraphicsWrapper
009632e0 3 852 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[System.Collections.Generic.List`1[[System.String, mscorlib]], mscorlib]][]
7ae3c354 59 944 System.Drawing.Drawing2D.GraphicsState
7b2251f8 80 960 System.Windows.Forms.Control+MultithreadSafeCallScope
79328aa0 42 1008 System.Collections.Generic.List`1[[System.String, mscorlib]]
0124bdcc 1 1148 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[SD.LLBLGen.Pro.ORMSupportClasses.PersistenceInfoProviderBase+ElementToTargetMapping, SD.LLBLGen.Pro.ORMSupportClasses.NET20]][]
0124a058 1 1148 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[SD.LLBLGen.Pro.ORMSupportClasses.FieldInfoProviderBase+ElementFields, SD.LLBLGen.Pro.ORMSupportClasses.NET20]][]
7b2373b4 52 1248 System.Windows.Forms.NativeMethods+COMRECT
7b22583c 85 1360 System.Windows.Forms.Internal.IntNativeMethods+POINT
7a5ecc40 75 1500 System.Collections.Specialized.ListDictionary+DictionaryNode
7b225c30 78 1560 System.Windows.Forms.Internal.WindowsRegion
79330b3c 78 1560 System.Text.StringBuilder
7b225894 46 1656 System.Windows.Forms.Internal.WindowsSolidBrush
0124b9b4 61 1708 SD.LLBLGen.Pro.ORMSupportClasses.PersistenceInfoProviderBase+ElementToTargetMapping
7b225e50 13 1716 System.Windows.Forms.ButtonInternal.ButtonBaseAdapter+LayoutOptions
7a5ecb80 65 1820 System.Collections.Specialized.ListDictionary
7933061c 154 1848 System.Object
7ae3b874 60 1920 System.Drawing.Graphics
7b225ff0 13 1924 System.Windows.Forms.ButtonInternal.ButtonBaseAdapter+LayoutData
7b21a8c8 13 2028 System.Windows.Forms.ButtonInternal.ButtonBaseAdapter+ColorData
7ae3c0b4 59 2124 System.Drawing.GraphicsContext
01249c3c 61 2196 SD.LLBLGen.Pro.ORMSupportClasses.FieldInfoProviderBase+ElementFields
7ae3c1fc 144 2304 System.Drawing.Region
7ae3c10c 144 2304 System.Drawing.Drawing2D.Matrix
0124c414 61 2440 System.Collections.Generic.SortedList`2[[System.Int32, mscorlib],[SD.LLBLGen.Pro.ORMSupportClasses.IFieldPersistenceInfo, SD.LLBLGen.Pro.ORMSupportClasses.NET20]]
0124a87c 61 2440 System.Collections.Generic.SortedList`2[[System.Int32, mscorlib],[SD.LLBLGen.Pro.ORMSupportClasses.IFieldInfo, SD.LLBLGen.Pro.ORMSupportClasses.NET20]]
79333054 44 2464 System.Collections.Hashtable
7b2257ec 64 2560 System.Windows.Forms.PaintEventArgs
7932b280 112 2688 System.Collections.Stack
79320b00 122 2928 System.Collections.Generic.List`1[[System.Int32, mscorlib]]
7b223cc4 112 3136 System.Windows.Forms.Internal.DeviceContext+GraphicsState
7b2238b0 112 3136 System.Windows.Forms.Internal.WindowsGraphics
0124c118 61 3172 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[SD.LLBLGen.Pro.ORMSupportClasses.IFieldPersistenceInfo, SD.LLBLGen.Pro.ORMSupportClasses.NET20]]
0124a3a4 61 3172 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[SD.LLBLGen.Pro.ORMSupportClasses.IFieldInfo, SD.LLBLGen.Pro.ORMSupportClasses.NET20]]
79327310 62 3224 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.Int32, mscorlib]]
79331b80 166 3320 System.RuntimeType
7b223c80 209 3344 System.Windows.Forms.ClientUtils+WeakRefCollection+WeakRefObject
7932a040 137 4932 System.Single[]
648c8c6c 96 5376 System.Configuration.FactoryRecord
79329c6c 213 6816 System.EventHandler
7ae3cfec 580 6960 System.Drawing.KnownColor
7b2239ec 112 8064 System.Windows.Forms.Internal.DeviceContext
0124c7c8 61 8108 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[SD.LLBLGen.Pro.ORMSupportClasses.IFieldPersistenceInfo, SD.LLBLGen.Pro.ORMSupportClasses.NET20]][]
0124ae40 61 9740 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[SD.LLBLGen.Pro.ORMSupportClasses.IFieldInfo, SD.LLBLGen.Pro.ORMSupportClasses.NET20]][]
79333150 44 10224 System.Collections.Hashtable+bucket[]
79333470 4 10504 System.Byte[]
793276dc 62 11304 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[System.Int32, mscorlib]][]
0124a7f0 424 16960 SD.LLBLGen.Pro.ORMSupportClasses.FieldInfo
0124ca74 369 17712 SD.LLBLGen.Pro.ORMSupportClasses.FieldPersistenceInfo
79332b9c 402 19212 System.Int32[]
793325a8 1406 33744 System.Version
7932a1b0 2336 37376 System.WeakReference
7b221174 1 48600 System.Windows.Forms.NativeWindow+HandleBucket[]
793041d0 476 65232 System.Object[]
79330a00 1257 83912 System.String
Hey Matt, All my controls seem to by as you can see by the Dumpheap, there are still some LLBLGen objects hanging out.
The more I've read on this issue the more points to the fact the MS Dot Not isn't performing as advertised. I don't think there is anything wrong w/ LLBLGen. I have a high degree of confidence that Otis and Co. have their act together on this. I have found a number of blogs that suggest that .Net has some holes...
Oh...of corse once the application is close the objects are release. My problem is getting them to terminate while the app is still running.
A little more background: I create DLL's that plug into other software (as plug-ins if you would). The host application may run all day. My tools come into play on an as-needed basis.
Objects in .NET stay around as long as there are references to them. Main reasons for memory leaks are event handlers which keep objects in memory and unmanaged resources not being disposed. LLBLGen Pro entities don't have unmanaged resources and don't need dispose. The thing is though that if you store them in another object's Tag property for example, if that object is kept alive due to some reference somewhere, the entity is too, unless you remove it.
I've no idea why the panel object is kept alive. Windbg is not really helpful here, you need a memory profiler which shows a graph which objects refer to which other objects so you get a clear picture which objects keep the entities alive.
Also keep in mind that the GC doesn't run deterministically: it runs when the system is idle and for example every 15 minutes or even longer periods. This means that if a page is rendered and the objects are gone, it doesn't mean the objects are 'really gone' yet. The GC might kick in after some period of time.
For the CLR, memory in its possession isn't freed for the system until it absolutely has to. This way, object creation for .NET is faster, and it might look like there's a memory leak, but in fact there isn't.
We did test our code and windows' performance counters and memory profiles didn't show leaks of entities however if they're referred to by other objects which are kept alive somewhere (e.g. by the asp.net worker process) it might be a problem, however not something we can do anything about unfortunately.