CORBA的方法servant_to_reference泄漏内存(内存膨胀)以避免它 [英] CORBA's method servant_to_reference leaking memory (memory bloat) hwo to avoid it

查看:132
本文介绍了CORBA的方法servant_to_reference泄漏内存(内存膨胀)以避免它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

I am using CORBA (Common Object Request Broker Architecture)
C++ and calling CORBAs servant_to_reference to create a Object on the Remote server.

example : Class A
A *p = new A;
CORBA_POA->servant_to_reference  // here memory leak 

Question is How to avoid memory leak (memory bloat)
Memory leak is seen at the CORBA's servant_to_reference call
How to avoid that
Is there any CORBA method to clean the memory after  servant_to_reference call
or any alternate method to call instead of servant_to_reference 





我尝试过:



我试图调用deactivate_object.But那个电话是从服务器删除对象本身。但我只想清理/清除泄漏/膨胀的内存(由于servant_to_reference创建



What I have tried:

I tried to call deactivate_object.But that call is deleting the object itself from server.But I want just to clean/clear leaked/bloated memory (that was created due to servant_to_reference

推荐答案

您的实现有一些缺陷,但代码丢失了。所以你必须检查并调试你在该调用中触发的内容。



阅读文章 CORBA中的简单C ++客户端/服务器代码。



在该代码中稍后会清理使用过的对象。
Your implementation has some flaw, but the code is missing. So you must inspect and debug what you trigger in that call.

Read the article A Simple C++ Client/Server in CORBA for some example code.

In that code later is some cleanup of the used object.


这篇关于CORBA的方法servant_to_reference泄漏内存(内存膨胀)以避免它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆