如何使用xamarin形式捕获DidReceiveMemoryWarning。
在xamarin Studio中进行调试时,我可以在应用程序输出中看到它们,但是我找不到如何捕获事件或如何查看使用了多少内存。
我尝试了AppDomain.CurrentDomain.MonitoringTotalAllocatedMemorySize,但它引发了未实现的异常
我在按特定术语搜索文档时遇到困难.我每次都得到零结果.
这是一个代码示例:
var customers = new List<SampleCustomer>();
customers.Add(new SampleCustomer(){id=1,firstname="John", surname="Smith", country = "UK", sex = "Male", age=30});
customers.Add(new SampleCustomer(){id=2,firstname="Steve", surname="Jones", country ="UK", sex = "Male", age=22});
customers.Add(new SampleCustomer(){id=3,firstname="Kate", surname="Smith", country ="UK", sex = "Female", age=50});
customers.Add(new SampleCustomer(){id=4,firstname="Mark", surname="Jones", country ="USA", sex = "Male", age=45});
customers.Add(new SampleCustomer(){id=5,firstname="Emma", surname="Jonson", country ="USA", sex = "Female", age=25});
customers.Add(new SampleCustomer(){id=6,firstname="Tom", surname="Jones", country ="France", sex = "Male", age=30});
customers.Add(new SampleCustomer(){id=7,firstname="Liz", surname="Web", country ="France", sex = "Female", age=45});
foreach (var customer in customers)
{
_elasticClient.DeleteById("sample", "SampleCustomers",customer.id);
_elasticClient.Index(customer, …Run Code Online (Sandbox Code Playgroud)