Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7533065
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:38:02+00:00 2026-05-30T05:38:02+00:00

Is there a mechanism in the dependency injector in OpenRasta that tears down the

  • 0

Is there a mechanism in the dependency injector in OpenRasta that tears down the instance of an object that is created? Regardless the dependency lifetime.

I tried looking through the source, but could not directly find any tear down. Nor seems implementing IDisposable do the trick.

Update I was mainly looking for disposing a singleton, so I won’t be opening a ticket on the openrasta-core project. For the moment I keep track of the instance of the singleton in my own library (currently not knowing how to access singletons in OpenRasta directly), to access upon application close.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T05:38:04+00:00Added an answer on May 30, 2026 at 5:38 am

    Disposing is a whole bag of pain to implement right. Per-request objects have a known object lifetime (containers that implement the OR DI interface have a hook to know when to dispose that scope), statics (since 2.1.1) will be disposed by the container on shutdown of the host (which means nearly never for asp.net, and whenever you close the self-hosted server / in mem hosting), and transients we have no clue how to do it: how do you know when something has to be disposed if you don’t keep track of it, which if you do means that it doesn’t get released, it’s all very problematic.

    So the internal DI container doesn’t dispose anything at all, although we may add the disposing of singletons on container dispose and of per-request on request shutdown, I suppose that’d be quite useful. Feel free to add a github ticket on the openrasta-core project.

    Alternatively, use an existing IoC container in place of the existing one. Some people have also added custom contributors to do the cleanup themselves without having to use an external container.

    Seb

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In android there is a mechanism of ensuring that only one instance of a
Is there any mechanism in C# that allows one to define and declare an
Is there a mechanism to ensure that the tests to ensure that the data
Is there some mechanism to detect that a UDP or TCP packet was modified
Is there a standard mechanism or known library that will convert .png images to
There seems to be automatic caching that happens with MvcSiteMapProvider. Is there a mechanism
Is there a mechanism or accepted approach for responding to requests that have a
Is there a mechanism to capture when a user touches on the navigation bar
Is there a mechanism where I can identify a string in an email, say
Is there a mechanism to dynamically load a GWT Module? The idea is to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.