get_PresentationLockingBehavior()
Contents
[
Hide
]IBlobManagementOptions::get_PresentationLockingBehavior() method
This property defines if an instance of the Presentation class can be an owner of the source - file or stream during the instance lifetime. If the instance is an owner, it locks the source. This helps to improve memory consumption and performance while working with BLOBs, but the source (stream or file) can’t be changed during Presentation’s instance lifetime. This is an example:
virtual Aspose::Slides::PresentationLockingBehavior Aspose::Slides::IBlobManagementOptions::get_PresentationLockingBehavior()=0
Remarks
auto loadOptions = MakeObject<LoadOptions>();
loadOptions->get_BlobManagementOptions()->set_PresentationLockingBehavior(PresentationLockingBehavior::KeepLocked);
{
auto pres = MakeObject<Presentation>(u"pres.pptx", loadOptions);
// IOException will be thrown because pres.pptx is locked for a Presentation lifetime
// File::Delete(u"pres.pptx");
}
// after Presentation object destroyed, file is unlocked and can be deleted
IO::File::Delete(u"pres.pptx");
See Also
- Enum PresentationLockingBehavior
- Class IBlobManagementOptions
- Namespace Aspose::Slides
- Library Aspose.Slides