Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

WeakCache

Guides

  • Weak Cache Functions

Symbols

  • CheckWeakCache
  • CleanupAfter
  • ClearHistory
  • ClearWeakCache
  • CreateReference
  • SameInstanceQ
  • SetWeakCache
  • StrongReference
  • WeakHashTable
  • WeakReference
JasonB`WeakCache`
SameInstanceQ
​
SameInstanceQ
[
expr
1
,
expr
2
]
returns
True
if
expr1
and
expr2
share the same instance.
​
​
SameInstanceQ
[
expr
1
,
expr
2
,…]
returns
True
if all the
expr
i
are the same instance.
​
Details and Options

Examples  
(9)
Basic Examples  
(2)
Two expressions that are identical are considered
SameQ
:
In[1]:=
a="key"1;​​b="key"1;​​a===b
Out[1]=
True
However, they are different instances of the same data:
In[2]:=
SameInstanceQ
[a,b]
Out[2]=
False
In[3]:=
c=a;​​
SameInstanceQ
[a,c]
Out[3]=
True
​
Two strings entered separately are different instances:
In[1]:=
SameInstanceQ
["foo","foo"]
Out[1]=
False
In[2]:=
SameInstanceQ
[foo="foo",foo]
Out[2]=
True
Two undefined symbols are always the same instance:
In[3]:=
ClearAll[foo]​​
SameInstanceQ
[undefined,undefined]
Out[3]=
True
Scope  
(1)

Properties & Relations  
(5)

Possible Issues  
(1)

SeeAlso
SameQ
RelatedGuides
▪
Weak Cache Functions
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com