| 307 | } |
| 308 | |
| 309 | PJ_CONTEXT *proj_context_destroy(PJ_CONTEXT *ctx) { |
| 310 | if (nullptr == ctx) |
| 311 | return nullptr; |
| 312 | |
| 313 | /* Trying to free the default context is a no-op (since it is statically |
| 314 | * allocated) */ |
| 315 | if (pj_get_default_ctx() == ctx) |
| 316 | return nullptr; |
| 317 | |
| 318 | delete ctx; |
| 319 | return nullptr; |
| 320 | } |
| 321 | |
| 322 | /************************************************************************/ |
| 323 | /* proj_context_use_proj4_init_rules() */ |