René's URL Explorer Experiment


Title: Unable to reclaim memory when using API · Issue #2471 · IfcOpenShell/IfcOpenShell · GitHub

Open Graph Title: Unable to reclaim memory when using API · Issue #2471 · IfcOpenShell/IfcOpenShell

X Title: Unable to reclaim memory when using API · Issue #2471 · IfcOpenShell/IfcOpenShell

Description: I've encountered an issue with Python actually reclaiming memory from an opened file loaded into memory. I'm using Python 3.8 with ifcopenshell 0.7.0 from PyPI. A snippet from a function in my case: ifcopenshell_settings = ifcopenshell.g...

Open Graph Description: I've encountered an issue with Python actually reclaiming memory from an opened file loaded into memory. I'm using Python 3.8 with ifcopenshell 0.7.0 from PyPI. A snippet from a function in my case...

X Description: I've encountered an issue with Python actually reclaiming memory from an opened file loaded into memory. I'm using Python 3.8 with ifcopenshell 0.7.0 from PyPI. A snippet from a function in...

Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/2471

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Unable to reclaim memory when using API","articleBody":"> I've encountered an issue with Python actually reclaiming memory from an opened file loaded into memory.\r\n> \r\n> \r\n> I'm using Python 3.8 with ifcopenshell 0.7.0 from PyPI.\r\n> A snippet from a function in my case:\r\n> ```python\r\n> ifcopenshell_settings = ifcopenshell.geom.settings()\r\n> ifcopenshell_settings.set(ifcopenshell_settings.USE_WORLD_COORDS, True)\r\n> ifcopenshell_settings.set(ifcopenshell_settings.USE_BREP_DATA, True)\r\n> ifcopenshell_settings.set(ifcopenshell_settings.USE_PYTHON_OPENCASCADE, True)\r\n> \r\n> ifc_file = ifcopenshell.open(ifc_filename)\r\n> \r\n> # this doesn't affect garbage collection\r\n> xAxisOrdinate, xAxisAbscissa = ifc_file.by_type(\"IfcProject\")[0].RepresentationContexts[0].TrueNorth.DirectionRatios\r\n> \r\n> site = ifc_file.by_type(\"IfcSite\")[0]\r\n> \r\n> # this line prevents memory reclaim and the ifc_file stays in memory indefinitely\r\n> conversion_pset = ifcopenshell.api.run(\"pset.add_pset\", ifc_file, product=site, name=\"ePSet_MapConversion\")\r\n> ```\r\n> \r\n> After running this snippet multiple times (e.g. in a loop), I'm seeing a memory leak, where the `ifc_file` doesn't get unloaded. After some time this crashes the host (OOM).\r\n> \r\n> Maybe there's something I'm overlooking when opening or using the file? After removing the last line from the snippet - the memory leak is gone.\r\n\r\n_Originally posted by @YaroslavKormushyn in https://github.com/IfcOpenShell/IfcOpenShell/issues/650#issuecomment-1265472998_\r\n      ","author":{"url":"https://github.com/aothms","@type":"Person","name":"aothms"},"datePublished":"2022-10-04T07:11:57Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/2471"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:c9b73486-ee34-a9e6-200b-6358a8583768
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id90F4:F551D:86C193:B4E3C0:6B04A9F0
html-safe-nonce088fa1bb078b7c4ae2fbed1b1446e2ccc39fd877a153e818cc168b2235758ad8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MEY0OkY1NTFEOjg2QzE5MzpCNEUzQzA6NkIwNEE5RjAiLCJ2aXNpdG9yX2lkIjoiNDIwOTI0ODkwMzE0MjYxNTUzNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacb89367973f0f407ff4870dda992f9932e2d674f700f48c49432b6dc08889d655
hovercard-subject-tagissue:1395773387
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/2471/issue_layout
twitter:imagehttps://opengraph.githubassets.com/287c4c5d3cbee48b0aaabb99817c91fe23edc0d4071f2429dc2563a8f6e3e86b/IfcOpenShell/IfcOpenShell/issues/2471
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/287c4c5d3cbee48b0aaabb99817c91fe23edc0d4071f2429dc2563a8f6e3e86b/IfcOpenShell/IfcOpenShell/issues/2471
og:image:altI've encountered an issue with Python actually reclaiming memory from an opened file loaded into memory. I'm using Python 3.8 with ifcopenshell 0.7.0 from PyPI. A snippet from a function in my case...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameaothms
hostnamegithub.com
expected-hostnamegithub.com
None188497a0f45a7aa8f7c866faa1950d1a7f8d82b59416adf549b222ad1d1dd19b
turbo-cache-controlno-preview
go-importgithub.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git
octolytics-dimension-user_id13692563
octolytics-dimension-user_loginIfcOpenShell
octolytics-dimension-repository_id40473201
octolytics-dimension-repository_nwoIfcOpenShell/IfcOpenShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id40473201
octolytics-dimension-repository_network_root_nwoIfcOpenShell/IfcOpenShell
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release557cfbac6cdb532730c95c90f2cefdc0c4128029
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/IfcOpenShell/IfcOpenShell/issues/2471#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2F2471
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2F2471
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=IfcOpenShell%2FIfcOpenShell
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/2471
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/2471
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/2471
IfcOpenShellhttps://github.com/IfcOpenShell
IfcOpenShellhttps://github.com/IfcOpenShell/IfcOpenShell
Codehttps://github.com/IfcOpenShell/IfcOpenShell
Issues1.2k (1.2k)https://github.com/IfcOpenShell/IfcOpenShell/issues
Pull requests937 (937)https://github.com/IfcOpenShell/IfcOpenShell/pulls
Discussionshttps://github.com/IfcOpenShell/IfcOpenShell/discussions
Actionshttps://github.com/IfcOpenShell/IfcOpenShell/actions
Projectshttps://github.com/IfcOpenShell/IfcOpenShell/projects
Wikihttps://github.com/IfcOpenShell/IfcOpenShell/wiki
Security and qualityhttps://github.com/IfcOpenShell/IfcOpenShell/security
Insightshttps://github.com/IfcOpenShell/IfcOpenShell/insights
https://github.com/IfcOpenShell/IfcOpenShell
New issuehttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/2471
New issuehttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/2471
Unable to reclaim memory when using APIhttps://github.com/IfcOpenShell/IfcOpenShell/issues/2471#top
IfcOpenShell-Pythonhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22IfcOpenShell-Python%22
https://github.com/aothms
aothmshttps://github.com/aothms
on Oct 4, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issue-1395773387
@YaroslavKormushynhttps://github.com/YaroslavKormushyn
#650 (comment)https://github.com/IfcOpenShell/IfcOpenShell/issues/650#issuecomment-1265472998
Nexthttps://github.com/IfcOpenShell/IfcOpenShell/issues/2471?timeline_page=1
https://github.com/aothms
aothmshttps://github.com/aothms
on Oct 4, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1266511887
@Moulthttps://github.com/Moult
@YaroslavKormushynhttps://github.com/YaroslavKormushyn
@Moulthttps://github.com/Moult
https://github.com/Moult
Moulthttps://github.com/Moult
on Oct 4, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1266515939
https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcopenshell-python/ifcopenshell/file.py#L258https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcopenshell-python/ifcopenshell/file.py#L258
https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcopenshell-python/ifcopenshell/entity_instance.py#L110https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcopenshell-python/ifcopenshell/entity_instance.py#L110
6b0a58d#diff-b63197ec4d064fc4387ed3f1b8becdbf26fc1c441afea3a07e701d384134a2f7https://github.com/IfcOpenShell/IfcOpenShell/commit/6b0a58db7dec353dbf931aee7add92e3d97ef77e#diff-b63197ec4d064fc4387ed3f1b8becdbf26fc1c441afea3a07e701d384134a2f7
https://github.com/aothms
aothmshttps://github.com/aothms
on Oct 4, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1266525159
@Moulthttps://github.com/Moult
https://github.com/aothms
aothmshttps://github.com/aothms
on Oct 4, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1266528735
https://github.com/Moult
Moulthttps://github.com/Moult
on Oct 4, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1266533391
https://github.com/Moult
Moulthttps://github.com/Moult
on Oct 4, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1266537592
https://github.com/aothms
aothmshttps://github.com/aothms
on Oct 4, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1266547533
aothmshttps://github.com/aothms
on Oct 4, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#event-7513959185
#2471 work around file gc with instance refshttps://github.com/IfcOpenShell/IfcOpenShell/commit/f41ad0d5de0a82848cf3fecb56b727195135f969
#2471https://github.com/IfcOpenShell/IfcOpenShell/issues/2471
f41ad0dhttps://github.com/IfcOpenShell/IfcOpenShell/commit/f41ad0d5de0a82848cf3fecb56b727195135f969
#2471 test casehttps://github.com/IfcOpenShell/IfcOpenShell/commit/5d954759704c5c06b192e8a0b400d2619d0f88b4
#2471https://github.com/IfcOpenShell/IfcOpenShell/issues/2471
5d95475https://github.com/IfcOpenShell/IfcOpenShell/commit/5d954759704c5c06b192e8a0b400d2619d0f88b4
https://github.com/aothms
aothmshttps://github.com/aothms
on Oct 4, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1266578340
@YaroslavKormushynhttps://github.com/YaroslavKormushyn
https://github.com/aothms
aothmshttps://github.com/aothms
on Oct 4, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1266585109
https://github.com/YaroslavKormushyn
YaroslavKormushynhttps://github.com/YaroslavKormushyn
on Oct 4, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1267120579
@YaroslavKormushynhttps://github.com/YaroslavKormushyn
https://github.com/Moult
Moulthttps://github.com/Moult
on Oct 4, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1267733992
@YaroslavKormushynhttps://github.com/YaroslavKormushyn
#2468https://github.com/IfcOpenShell/IfcOpenShell/issues/2468
@YaroslavKormushynhttps://github.com/YaroslavKormushyn
Moulthttps://github.com/Moult
IfcOpenShell-Pythonhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22IfcOpenShell-Python%22
on Oct 4, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#event-7520791112
https://github.com/YaroslavKormushyn
YaroslavKormushynhttps://github.com/YaroslavKormushyn
on Oct 5, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1267975331
@Moulthttps://github.com/Moult
https://github.com/FLming
FLminghttps://github.com/FLming
on Nov 5, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1304539834
@Moulthttps://github.com/Moult
https://github.com/Moult
Moulthttps://github.com/Moult
on Nov 5, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1304540791
@aothmshttps://github.com/aothms
https://github.com/aothms
aothmshttps://github.com/aothms
on Nov 5, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1304546294
https://github.com/FLming
FLminghttps://github.com/FLming
on Nov 5, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1304546919
https://github.com/FLming
FLminghttps://github.com/FLming
on Nov 5, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1304551758
@Moulthttps://github.com/Moult
@aothmshttps://github.com/aothms
aothmshttps://github.com/aothms
on Nov 5, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#event-7745899916
#2471 Fix refcount when setting aggregateshttps://github.com/IfcOpenShell/IfcOpenShell/commit/ca98e77b4026135d5dd2c8f6f6a773d14d834fe8
#2471https://github.com/IfcOpenShell/IfcOpenShell/issues/2471
ca98e77https://github.com/IfcOpenShell/IfcOpenShell/commit/ca98e77b4026135d5dd2c8f6f6a773d14d834fe8
https://github.com/aothms
aothmshttps://github.com/aothms
on Nov 5, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1304567204
https://pl.python.org/docs/api/refcountDetails.htmlhttps://pl.python.org/docs/api/refcountDetails.html
@FLminghttps://github.com/FLming
https://github.com/FLming
FLminghttps://github.com/FLming
on Nov 5, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1304570769
e508fb4https://github.com/IfcOpenShell/IfcOpenShell/commit/e508fb44f25da05c3be9b9552c405b3c0ba58f23
fa6bbf2https://github.com/IfcOpenShell/IfcOpenShell/commit/fa6bbf2d4a69cb8d1f793b3d4ca86571e9b414e8
https://github.com/FLming
FLminghttps://github.com/FLming
on Nov 5, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1304571839
https://github.com/aothms
aothmshttps://github.com/aothms
on Nov 5, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1304572600
#2471 (comment)https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1266511887
https://github.com/aothms
aothmshttps://github.com/aothms
on Nov 5, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1304572950
https://github.com/FLming
FLminghttps://github.com/FLming
on Nov 5, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1304575896
#2471 (comment)https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1266511887
https://github.com/aothms
aothmshttps://github.com/aothms
on Nov 10, 2022https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-1309913511
IfcOpenBot@1d6c3b3#commentshttps://github.com/IfcOpenBot/IfcOpenShell/commit/1d6c3b3fc2ee60163b5944b89440f34ac80958ed#comments
https://github.com/Moult
Moulthttps://github.com/Moult
on Oct 26, 2025https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-3448064536
https://github.com/petruconduraru
petruconduraruhttps://github.com/petruconduraru
on Jul 11, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/2471#issuecomment-4943804833
Sign up for freehttps://github.com/signup?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/2471
Sign in to commenthttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/2471
IfcOpenShell-Pythonhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22IfcOpenShell-Python%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.