silverlight内存泄漏(silverlight memory leak)

   IT问题网   2021-01-18 00:00:00

问 题

嗨,

i使用以下代码创建了一个使用回调方法更改的dependencyproperty:

  public   void  registerfornotification( string  propertyname,frameworkelement element,propertychangedcallback callback)
{

binding b = new binding(propertyname){source = element};
var prop = system.windows.dependencyproperty.registerattached(
" listenattached" + propertyname,
typeof object ),
typeof (usercontrol),
new system.windows。 propertymetadata(回调));
element.setbinding(prop,b);
}




回调方法在我的应用程序中导致内存泄漏,如何取消注册这个回调方法?



提前感谢。

解决方案

看一下这篇文章 stackoverflow网站

标签:内存泄漏泄露透露



分享:

  • 微信
  • QQ好友
  • QQ空间
  • 新浪微博


热门推荐

如何在json中获取单个元素(How to get single element in json)

problem in wcf service i am getting json response in that ...

双击文件打开程序,如何在c#中实现(double click on file opens program, how to implement in c#)

problem usually when a program in installed, you can clic ...

如何在我添加的现有数据表中添加新列,但它是bofore行的结尾(how add new column in existing datatable i added but its is come end of the bofore rows)

problem my datatable contans two columns id value ----- ...

如何在c#.net中的现有页面中打开新网址(How to open new url in existing page in c#.net)

problem hi to all, this is mdsiddiqali.i added new page n ...

DeleteObject方法不会删除任何内容 - 请帮忙。(DeleteObject method doesn't delete anything - please help.)

problem hello. i am trying to create method that will del ...

项目模板类型在C#中使用?(PROJECT TEMPLATE TYPE TO USE IN C#)

problem edit; okay i am creating a dock for programs to r ...

如何在我添加的现有数据表中添加新列,但它是bofore行的结尾(how add new column in existing datatable i added but its is come end of the bofore rows)

problem my datatable contans two columns ; id value ---- ...

在c#和asp.net中使用LinkedIn API?(Working with LinkedIn APIs in c# and asp.net )

problem hey i was trying to design an asp.net based webs ...

设计模式的案例研究(Case Studies for Design Pattern)

problem hi everyone, though i found "design patterns exp ...

返回所有组件(Retur all components)

problem dears, i need a method to return all named contro ...

Picturebox控件不会触发鼠标事件(Picturebox control not firing mouse events)

problem i have a picturebox control in a groupbox control ...

Windows 7中的VB.net + Crystall报告问题(VB.net + Crystall report issue in Windows 7)

problem i have created windows application in vb.net 2005 ...

如何将数据表中的数据保存回数据库?(How to save the data in a datatable back into the database)

problem i have filled my datatable with my sqladapter ass ...

测试ip和developpe ip扫描仪(Test ip and developpe ip scanner)

problem hi friends, i want help !!! i need c ...

在.Net中使用WCF的3层(3 tier using WCF in .Net)

problem hi, i have developed a 3 tier application in vb. ...

连续循环不循环(Continual Loop Not Looping)

problem j have code that is suppose to continue looping l ...

vb中的动态按钮控件(Dynamic button control in vb)

problem hi, i''ve a 10x10 matrix of buttons. i need to c ...

动态创建按钮的事件处理程序(event handler for dynamically created buttons)

problem i''ve created 100 buttons dynamically. but how to ...

电子邮件提醒新文章评论(Email alert for new article comments)

problem hi, i recently posted a couple of articles to c ...

在asp.net 3.5中创建第三方组件(creating third party component in asp.net 3.5)

problem i am already created a chat application. now i wa ...