# FileGeoDatabase -- Cannot access a disposed object

**URL:** <https://community.thinkgeo.com/t/filegeodatabase-cannot-access-a-disposed-object/9565>\
**Category:** WPF\
**Created:** [July 30, 2019, 3:25pm UTC](https://community.thinkgeo.com/t/filegeodatabase-cannot-access-a-disposed-object/9565 "2019-07-30T15:25:34Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [August 5, 2019, 10:01am UTC](https://community.thinkgeo.com/t/filegeodatabase-cannot-access-a-disposed-object/9565/3 "2019-08-05T10:01:45Z")

</div>

Hi Dennis,

I reproduced this exception when I tried to close the application form.

If you also met that when you try to close application, I think that’s because your code hadn’t call close for this layer.

Generally you can close it after use it like this:

```
    map.CurrentExtent = fileGeoDatabaseFeatureLayer.GetBoundingBox();
    fileGeoDatabaseFeatureLayer.Close();
    map.Refresh();

```

Regards,

Ethan

---

_[View the full topic](https://community.thinkgeo.com/t/filegeodatabase-cannot-access-a-disposed-object/9565)._
