Hi guys,
I am using Azure Service Bus Queue as described here:
https://azure.microsoft.com/en-us/documentation/articles/service-bus-dotnet-how-to-use-queues/#comments
Source code is following:
...
string connectionString = CloudConfigurationManager.GetSetting("Microsoft.ServiceBus.ConnectionString.Import");string importQueueName = CloudConfigurationManager.GetSetting("ImportQueueName");
var namespaceManager = NamespaceManager.CreateFromConnectionString(connectionString);
if (namespaceManager.QueueExists(importQueueName))
{
QueueClient client = QueueClient.CreateFromConnectionString(connectionString, importQueueName);
BrokeredMessage message = new BrokeredMessage(XmlTextBox.Text);
message.Properties["BusinessUnitCode"] = BusinessUnitTextEdit.Text;
message.Properties["DocumentType"] = DocumentTypeComboBox.Text;
client.Send(message);
MessageBox.Show("Sent");
}
else
MessageBox.Show("Not found!");
...
Every time this code is executed memory leaks approximately 1Mb. I tried to put "BrokeredMessage" inside "using" statement but that did not help either.
Is there anything that I am missing?
Thanks in advance.