Hi @Anandhan Rajagopal ,
Welcome to Microsoft Q&A!
I can also reproduce the same behavior.
At first, I also thought it was related to event registration, but it doesn’t seem to be the key point of this problem.
It is recommended to define max1
as a global variable, and the leak will disappear.
List<object> max1 = new List<object>();
public MainPage()
{
Employees = new List<Employee>();
this.InitializeComponent();
max1.Add(new Employee { Name = "Lucas", Email = "lucas@syncfusion.com" });
max1.Add(new Employee { Name = "James", Email = "james@syncfusion.com" });
max1.Add(new Employee { Name = "Jacob", Email = "jacob@syncfusion.com" });
}
private void popup_Opened(object sender, object e)
{
CustomBox.ItemsSource = max1;
}
Thank you.
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.