| 151 | static bool IBWasInitialized; |
| 152 | |
| 153 | TIntrusivePtr<TIBMemPool> GetIBMemPool() { |
| 154 | TGuard<TMutex> gg(IBMemMutex); |
| 155 | if (IBWasInitialized) { |
| 156 | return IBMemPool; |
| 157 | } |
| 158 | IBWasInitialized = true; |
| 159 | |
| 160 | TIntrusivePtr<TIBPort> ibPort = GetIBDevice(); |
| 161 | if (ibPort.Get() == nullptr) { |
| 162 | return nullptr; |
| 163 | } |
| 164 | IBMemPool = new TIBMemPool(ibPort->GetCtx()); |
| 165 | return IBMemPool; |
| 166 | } |
| 167 | } |
no test coverage detected