Fix getOrCreateInstance()
doc example
#39281
Merged
getOrCreateInstance()
doc example
#39281