SkyDrive - 上传大文件时的Outofmemory异常 [英] SkyDrive - Outofmemory exception when uploading big files
问题描述
Hi, double u = double l = double l =
DeviceStatus.ApplicationMemoryUsageLimit; 您上传的文件是否超过100MB? 100MB是通过API上传文件的限制。 Is the file you're uploading over 100MB? 100MB is the limit for file uploads via the API. 今年早些时候 Earlier this year there
wasn't a way to cancel an in-progress upload but I'll have to check whether this has changed. 这篇关于SkyDrive - 上传大文件时的Outofmemory异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
在我的一个WP7.1应用程序中,我将一个大文件上传到skydrive时会出现Outofmemory异常。我试图上传的文件大约是100 MB。
我正在使用LiveClient。 UploadAsync(...)函数用于上传文件。
$
在LiveUploadProgressChanged事件处理程序中,我可以看到它上传到80百分之后再崩溃。
在同一个功能中,我也使用以下功能显示设备内存使用情况,我可以看到设备内存使用率上升并达到设备内存使用限制。然后崩溃。
In one of my WP7.1 app, I am getting Outofmemory exception when uploading a big file to skydrive. The file I am trying to upload is about 100 mb.
I am using the LiveClient.UploadAsync(...) function to upload the file.
In the LiveUploadProgressChanged event handler I can see it uploads upto 80 percent and then crashes.
In the same function I am also displaying the device memory usage using the below functions and I could see the device memory usage going up and reaching towards the device memory usage limit.Then it crashes.
DeviceStatus < span style ="font - 家庭:索拉; font-size:13px"> .ApplicationCurrentMemoryUsage;
DeviceStatus .ApplicationMemoryUsageLimit;
我的问题如下。
1为什么UploadAsync()方法占用了大量的内存,有没有办法强制进行内存重新编码?
2.如何取消LiveClient。 UploadAsync(...)中途?如果有办法取消?如果我可以取消,那么我可以检查内存使用情况并取消上传,如果它达到限制。
3.如果程序遇到内存异常,是否有办法以受控方式退出程序。此异常不由try / catch函数处理。 />
非常感谢任何帮助。
最好的问候
The questions I have is below.
1. Why is the UploadAsync() method using up so much memory and is there a way I could force some memory recyling?
2. How do I cancel a LiveClient.UploadAsync(...) halfway? If there is way to cancel? If I could cancel, then i can check the memory usage and cancel the upload if its reaching the limit.
3. Is there a way to exit the program in a controlled manner if its hits out of memory exception. this exception is not handled by the try/catch functions.
Any help is greatly appreciated.
Best Regards
推荐答案
不是取消正在进行的上传的方法但是我必须检查这是否已经改变。