none
Context.CodePackageActivationContext.TempDirectory cleanup RRS feed

  • Question

  • I'm using Context.CodePackageActivationContext.TempDirectory to store some temp files. Is there any automatic deletion or cleanup mechanism performed by the SF runtime or am i solely responsible for that?

    thank you

    Carl


    Friday, June 8, 2018 2:16 AM

Answers

  • We do not clean up these folders on your behalf. They do get cleaned up automatically if the application leaves the machine (say that application instance is deleted). But if your application is forever on that node and does not leave which would mean the node is deleted then you would want to implement some routine deletion service. 

    Friday, June 8, 2018 5:49 PM
    Moderator

All replies

  • We do not clean up these folders on your behalf. They do get cleaned up automatically if the application leaves the machine (say that application instance is deleted). But if your application is forever on that node and does not leave which would mean the node is deleted then you would want to implement some routine deletion service. 

    Friday, June 8, 2018 5:49 PM
    Moderator
  • Hi Micah,

    Can you clarify what you meant by "But if your application is forever on that node and does not leave which would mean the node is deleted then you would want to implement some routine deletion service"?

    Will there be any case when the TempDirectory doesn't get cleaned up in the event that an application instance is deleted?
    I'm trying to make certain the TempDirectory gets emptied for an application instance deletion as I don't want my node (or VM) to keep the temporary files forever.

    Any clarification would be appreciated.

    Thanks,
    Jeehwan

    Friday, April 26, 2019 5:58 PM